emacs-devel
[Top][All Lists]
Advanced

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

Re: substitute-key-definition vs. define-key MAP [remap ...]


From: Stefan Monnier
Subject: Re: substitute-key-definition vs. define-key MAP [remap ...]
Date: Fri, 23 Jul 2010 00:36:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> So, am I right in saying that using substitute-key-definition on global
> map directly is a bad practice?

Yes and no.  Part of the reason why it exists is because that code was
written before remap was available.  Another part is because I'm not
sure remap is available in XEmacs, so packages who want to work in
XEmacs may prefer not to use it.

Finally, in some cases, using remap is not the right answer either
because remap not only replaces the command at its "usual" key-bindings,
but at all its key-bindings, which means that the user has no way to
access the original command other than via M-x (she can't make her own
key-binding for it, for instance).  So remap can only be used when the
remapped command really makes the original command undesirable.


        Stefan



reply via email to

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