[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bind commands that change buffer contents to `undefined' when read-o

From: Stefan Monnier
Subject: Re: bind commands that change buffer contents to `undefined' when read-only?
Date: Sun, 23 Sep 2007 14:16:14 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

>> That's not a problem.  Your suggestion is really just an extension of
>> `suppress-keymap' and should be used similarly: by putting those
>> `undefined' bindings first and then adding the local bindings.

> Yes, that would be OK for Emacs. In my own use, however, the various keymaps
> can be already defined before I get to them.

In any case I don't like much this idea of adding explicit `undefined'
bindings, just in order to get a "undefined" message rather than
a "buffer is read-only" error.

So maybe a better direction is to change the toplevel so that using
a command with a "*" (or a call to barf-if-buffer-read-only) in its
interactive spec when the buffer is read-only will signal "undefined" rather
than signalling the error.  And similarly C-h k may give information such as
"the global binding is foo but is of no use in this buffer because it's


reply via email to

[Prev in Thread] Current Thread [Next in Thread]