diff options
author | David Bremner <bremner@unb.ca> | 2010-02-11 23:01:07 -0400 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-02-20 12:20:54 -0800 |
commit | b20bc7028dbc413d270122d187e6afffbee008e5 (patch) | |
tree | 8818b4da03507fbcef5dc22458ad0e229a49931e /notmuch.el | |
parent | 1137ce11e11f031d30e6684cd56f0ec5654a3d97 (diff) |
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.
Diffstat (limited to 'notmuch.el')
-rw-r--r-- | notmuch.el | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1000,8 +1000,12 @@ For a mouse binding, return nil." (if (mouse-event-p key) nil (if (keymapp action) - (let ((substitute (apply-partially 'notmuch-substitute-one-command-key-with-prefix (notmuch-prefix-key-description key)))) - (mapconcat substitute (cdr action) "\n")) + (let ((substitute (apply-partially 'notmuch-substitute-one-command-key-with-prefix (notmuch-prefix-key-description key))) + (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)) "\t" (notmuch-documentation-first-line action)))))) |