all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: Teemu Likonen <tlikonen@iki.fi>,
	Stefan Monnier <monnier@IRO.UMontreal.CA>,
	emacs-devel@gnu.org
Subject: Re: substitute-key-definition vs. define-key MAP [remap ...]
Date: Sun, 25 Jul 2010 12:21:29 +0900	[thread overview]
Message-ID: <87vd84tfeu.fsf@catnip.gol.com> (raw)
In-Reply-To: <87tynpvtvz.fsf@uwakimon.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Sat, 24 Jul 2010 23:25:52 +0900")

"Stephen J. Turnbull" <stephen@xemacs.org> 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	other threads:[~2010-07-25  3:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15  8:25 substitute-key-definition vs. define-key MAP [remap ...] Teemu Likonen
2010-07-22 22:36 ` Stefan Monnier
2010-07-23  3:50   ` Stephen J. Turnbull
2010-07-23  9:26     ` Stefan Monnier
2010-07-23  9:32       ` Miles Bader
2010-07-24  7:08         ` Stephen J. Turnbull
2010-07-24  8:19           ` David Kastrup
2010-07-24  9:33           ` Miles Bader
2010-07-24 14:25             ` Stephen J. Turnbull
2010-07-25  3:21               ` Miles Bader [this message]
2010-07-25 10:19                 ` Stephen J. Turnbull
2010-07-25 13:43                   ` Miles Bader
2010-07-23 10:03       ` David Kastrup
2010-07-24  6:27         ` Stephen J. Turnbull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vd84tfeu.fsf@catnip.gol.com \
    --to=miles@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=stephen@xemacs.org \
    --cc=tlikonen@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.