To support key remapping in emacs help we need to know the base keymap
when looking at the remapping. keep track of this while we recurse
down the sub-keymaps in help.
---
 emacs/notmuch-lib.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 33790e2..7b1fc33 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -261,7 +261,7 @@ It does not prepend if ACTUAL-KEY is already listed in 
TAIL."
            tail)))
     tail)

-(defun notmuch-describe-keymap (keymap ua-keys &optional prefix tail)
+(defun notmuch-describe-keymap (keymap ua-keys base-keymap &optional prefix 
tail)
   "Return a list of cons cells, each describing one binding in KEYMAP.

 Each cons cell consists of a string giving a human-readable
@@ -278,7 +278,7 @@ prefix argument.  PREFIX and TAIL are used internally."
           ((keymapp binding)
            (setq tail
                  (notmuch-describe-keymap
-                  binding ua-keys (notmuch-prefix-key-description key) tail)))
+                  binding ua-keys base-keymap (notmuch-prefix-key-description 
key) tail)))
           (binding
            (setq tail (notmuch-describe-key (vector key) binding prefix 
ua-keys tail)))))
    keymap)
@@ -293,7 +293,7 @@ prefix argument.  PREFIX and TAIL are used internally."
               (let* ((keymap-name (substring doc (match-beginning 1) 
(match-end 1)))
                      (keymap (symbol-value (intern keymap-name)))
                      (ua-keys (where-is-internal 'universal-argument keymap t))
-                     (desc-alist (notmuch-describe-keymap keymap ua-keys))
+                     (desc-alist (notmuch-describe-keymap keymap ua-keys 
keymap))
                      (desc-list (mapcar (lambda (arg) (concat (car arg) "\t" 
(cdr arg))) desc-alist)))
                 (mapconcat #'identity desc-list "\n")))))
        (setq doc (replace-match desc 1 1 doc)))
-- 
1.7.9.1

Reply via email to