mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-03 15:21:41 +01:00
emacs: help: add base-keymap
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.
This commit is contained in:
parent
141f3813d8
commit
8141555d25
1 changed files with 3 additions and 3 deletions
|
@ -260,7 +260,7 @@ It does not prepend if ACTUAL-KEY is already listed in TAIL."
|
||||||
tail)))
|
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.
|
"Return a list of cons cells, each describing one binding in KEYMAP.
|
||||||
|
|
||||||
Each cons cell consists of a string giving a human-readable
|
Each cons cell consists of a string giving a human-readable
|
||||||
|
@ -277,7 +277,7 @@ prefix argument. PREFIX and TAIL are used internally."
|
||||||
((keymapp binding)
|
((keymapp binding)
|
||||||
(setq tail
|
(setq tail
|
||||||
(notmuch-describe-keymap
|
(notmuch-describe-keymap
|
||||||
binding ua-keys (notmuch-prefix-key-description key) tail)))
|
binding ua-keys base-keymap (notmuch-prefix-key-description key) tail)))
|
||||||
(binding
|
(binding
|
||||||
(setq tail (notmuch-describe-key (vector key) binding prefix ua-keys tail)))))
|
(setq tail (notmuch-describe-key (vector key) binding prefix ua-keys tail)))))
|
||||||
keymap)
|
keymap)
|
||||||
|
@ -292,7 +292,7 @@ prefix argument. PREFIX and TAIL are used internally."
|
||||||
(let* ((keymap-name (substring doc (match-beginning 1) (match-end 1)))
|
(let* ((keymap-name (substring doc (match-beginning 1) (match-end 1)))
|
||||||
(keymap (symbol-value (intern keymap-name)))
|
(keymap (symbol-value (intern keymap-name)))
|
||||||
(ua-keys (where-is-internal 'universal-argument keymap t))
|
(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)))
|
(desc-list (mapcar (lambda (arg) (concat (car arg) "\t" (cdr arg))) desc-alist)))
|
||||||
(mapconcat #'identity desc-list "\n")))))
|
(mapconcat #'identity desc-list "\n")))))
|
||||||
(setq doc (replace-match desc 1 1 doc)))
|
(setq doc (replace-match desc 1 1 doc)))
|
||||||
|
|
Loading…
Reference in a new issue