bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11325: 24.1.50; regression: bad order for `substitute-command-keys'


From: Lars Ingebrigtsen
Subject: bug#11325: 24.1.50; regression: bad order for `substitute-command-keys' with keymap
Date: Fri, 29 Apr 2016 18:35:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Here's a test case that's easier to work with.

(defvar foo-map
  (let ((map (make-keymap)))
    (define-key map "a" 'left-char)
    (define-key map "f" 'right-char)
    (define-key map "g" 'right-char)
    (define-key map "z" 'left-char)
    map))

This gives the following wrong output:

(insert (substitute-command-keys "\\{foo-map}"))
key             binding
---             -------

f .. g          right-char

a               left-char
z               left-char

If I use a `make-sparse-keymap' instead, I get the following, correct
output:

key             binding
---             -------

a               left-char
f .. g          right-char
z               left-char

So in non-sparse keymaps, there's something odd about how consecutive
key bindings are represented, and this leaks out in
`substitute-command-keys'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






reply via email to

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