]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.el
notmuch.el: convert sparse keymap to a list in notmuch-substitute-one-command-key...
[notmuch] / notmuch.el
index 342ce6abe6c55bb49f709a1c716452ad4fb09561..82471b57dc9b4cabb7271e73b61e4a80a4ada3a9 100644 (file)
@@ -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))))))