From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Gerard Brunick <gbrunick@math.utexas.edu>
Cc: 2179@debbugs.gnu.org
Subject: bug#2179: 23.0.60; define-key vs define-key-after key syntax
Date: Sun, 11 Sep 2011 23:18:20 +0200 [thread overview]
Message-ID: <m3litulqw3.fsf@stories.gnus.org> (raw)
In-Reply-To: <4987F2D6.2010900@math.utexas.edu> (Gerard Brunick's message of "Tue, 03 Feb 2009 01:31:34 -0600")
Gerard Brunick <gbrunick@math.utexas.edu> writes:
> (define-key my-map [(control l)] 'do-something)
>
> works as expected, but
>
> (define-key-after my-map [(control l)] 'do-something)
>
> does not. The reason is that define-key does a lot of work to allow
> for a wide range of key syntaxes, but define-key-after just does:
>
> (setq key
> (if (<= (length key) 1) (aref key 0) ...
>
> and (control l) must get mapped to ?\C-l = 12 to be useful in a keymap.
Yes, you'd expect both key's to allow the same syntax. However, as far
as I can see, all the magic to translate from the `define-key' key
syntax is inside that C function, so that would have to be refactored
out first. I think.
`define-key-after' should at least document the restricted key syntax it
allows...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
next prev parent reply other threads:[~2011-09-11 21:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 7:31 bug#2179: 23.0.60; define-key vs define-key-after key syntax Gerard Brunick
2011-09-11 21:18 ` Lars Magne Ingebrigtsen [this message]
2011-09-11 21:48 ` Andreas Schwab
2011-09-11 22:22 ` Lars Magne Ingebrigtsen
2011-09-12 7:48 ` Andreas Schwab
2011-09-12 7:59 ` Lars Magne Ingebrigtsen
2011-09-12 8:14 ` Andreas Schwab
2011-10-05 5:08 ` Glenn Morris
2011-10-06 19:16 ` Lars Magne Ingebrigtsen
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=m3litulqw3.fsf@stories.gnus.org \
--to=larsi@gnus.org \
--cc=2179@debbugs.gnu.org \
--cc=gbrunick@math.utexas.edu \
/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.