mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
notmuch.el: convert sparse keymap to a list in notmuch-substitute-one-command-key-with-prefix
The previous version would crash when a key was bound to a sparse keymap, since apparently these are not straightforward lists. The usage of map-keymap is a bit obscure: it only has side-effects, no return value.
This commit is contained in:
parent
1137ce11e1
commit
b20bc7028d
1 changed files with 6 additions and 2 deletions
|
@ -1000,8 +1000,12 @@ For a mouse binding, return nil."
|
||||||
(if (mouse-event-p key)
|
(if (mouse-event-p key)
|
||||||
nil
|
nil
|
||||||
(if (keymapp action)
|
(if (keymapp action)
|
||||||
(let ((substitute (apply-partially 'notmuch-substitute-one-command-key-with-prefix (notmuch-prefix-key-description key))))
|
(let ((substitute (apply-partially 'notmuch-substitute-one-command-key-with-prefix (notmuch-prefix-key-description key)))
|
||||||
(mapconcat substitute (cdr action) "\n"))
|
(as-list))
|
||||||
|
(map-keymap (lambda (a b)
|
||||||
|
(push (cons a b) as-list))
|
||||||
|
action)
|
||||||
|
(mapconcat substitute as-list "\n"))
|
||||||
(concat prefix (format-kbd-macro (vector key))
|
(concat prefix (format-kbd-macro (vector key))
|
||||||
"\t"
|
"\t"
|
||||||
(notmuch-documentation-first-line action))))))
|
(notmuch-documentation-first-line action))))))
|
||||||
|
|
Loading…
Reference in a new issue