emacs-devel
[Top][All Lists]
Advanced

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

Re: bind commands that change buffer contents to `undefined'whenread-onl


From: Stefan Monnier
Subject: Re: bind commands that change buffer contents to `undefined'whenread-only?
Date: Sat, 22 Sep 2007 21:49:12 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> Scrap the implementation I sent. Sorry about that. The general idea is OK,
> but it must not override any existing local binding of the key.

> It's not enough to check that the command is not bound in the local map; the
> key also must not be bound in the local map. So, for instance, even though
> `self-insert-command' is not bound in `dired-mode-map', that's not enough to
> determine that we should substitute `undefined' for the bindings of all keys
> that are globally bound to `self-insert-command'. `R', for instance is bound
> in `dired-mode-map', so it must not be rebound to `undefined'.

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.


        Stefan




reply via email to

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