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: Miles Bader
Subject: Re: substitute-key-definition vs. define-key MAP [remap ...]
Date: Sun, 25 Jul 2010 12:21:29 +0900

"Stephen J. Turnbull" <address@hidden> writes:
> For handy hacks, I really don't see what's so horrible about
> (defadvice self-insert-command (before caps-lock-mode activate)

So multiply that times 20 such little modes, and note that
self-insert-command is probably the most heavily-used command in
emacs...

> and I certainly don't think that concealing a limited advice
> capability in the keymap lookup process is any better than advice
> itself.

It's far better, because it follows the normal scoping rules of keymaps
(which is even more important in the case of minor mode maps), allowing
such overrides to be very narrowly targetted.  defadvice is a clumsy and
blunt tool by comparison.

[Yeah, I know, xemacs doesn't have [remap], and I don't expect you to
sing its charms....]

-Miles

-- 
Youth, n. The Period of Possibility, when Archimedes finds a fulcrum,
Cassandra has a following and seven cities compete for the honor of endowing a
living Homer.



reply via email to

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