From: "Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Command remapping and the delete-frame problem.
Date: Fri, 22 Feb 2002 11:24:14 -0500 [thread overview]
Message-ID: <200202221624.g1MGOEH30395@rum.cs.yale.edu> (raw)
In-Reply-To: 5xpu2xv81x.fsf@kfs2.cua.dk
> Earlier today, I wrote:
> >
> > Are you now saying that remapping should have been implemented
> > using a specific `command' prefix like this:
> >
> > (define-key map [command command1] 'command2)
> >
> > I can see that this is better than the current implementation as it
> > makes a clear destinction (in the keymaps) between commands and other
> > symbols like those used on the menu-bar, and a few symbols which are
> > both commands and keys (e.g. `undo').
> >
> > All of this makes a lot of sense -- should I go back and change the
> > implementation to use an explicit `command' prefix for command
> > remapping?
>
> Actually, I went ahead an made the changes in a fully transparent way.
> This means that internally, remapping command FOO to BAR is stored as
> a binding for [command FOO], i.e. the "event" `command' is bound to a
> keymap in which FOO is mapped to BAR.
Good. The delete-frame bug was that C-x 5 0 was bount to the
command `delete-frame' and that there is a `delete-frame' event
which is bound to `handle-delete-frame', so with the remapping
C-x 5 0 found itself suddenly remapped to `handle-delete-frame' (which
burped because it didn't expect to be bound to a key sequence).
> But the interface to define-key, lookup-key and key-binding hasn't
> changed. They just take FOO as the KEY argument - which is still an
> unambuguous way to represent command remapping, as those functions
> don't otherwise accept a symbol as the KEY argument.
That now sounds like a hack and I don't think it's worth keeping it.
Especially since it's not compatible with the XEmacs hack where
a non-vector argument passed to one of those functions is interpreted
the same as a length-1 vector so you can
(define-key 'button1 'command)
instead of
(define-key [button1] 'command)
which is itself a shorthand for
(define-key [(button1)] 'command)
-- Stefan
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2002-02-22 16:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5x3czwjqxs.fsf@kfs2.cua.dk>
[not found] ` <7263-Wed20Feb2002194728+0200-eliz@is.elta.co.il>
[not found] ` <5xd6yzwxs8.fsf@kfs2.cua.dk>
[not found] ` <200202220433.g1M4XP414080@aztec.santafe.edu>
[not found] ` <5xd6yx965v.fsf_-_@kfs2.cua.dk>
2002-02-22 15:40 ` Command remapping and the delete-frame problem Kim F. Storm
2002-02-22 16:24 ` Stefan Monnier [this message]
2002-02-22 19:31 ` Kim F. Storm
2002-02-22 19:38 ` Stefan Monnier
2002-02-23 20:19 ` Richard Stallman
2002-02-24 0:41 ` Kim F. Storm
2002-03-03 17:25 ` Tak Ota
2002-03-04 23:41 ` Richard Stallman
2002-03-05 6:19 ` Tak Ota
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200202221624.g1MGOEH30395@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).