GNU bug report logs - #2179
23.0.60; define-key vs define-key-after key syntax

Previous Next

Package: emacs;

Reported by: Gerard Brunick <gbrunick <at> math.utexas.edu>

Date: Tue, 3 Feb 2009 07:40:04 UTC

Severity: minor

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Gerard Brunick <gbrunick <at> math.utexas.edu>
Cc: 2179 <at> 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
Gerard Brunick <gbrunick <at> 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/




This bug report was last modified 13 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.