From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH v3 4/7] emacs: help: add base-keymap
Date: Fri, 8 Nov 2013 17:40:16 +0000 [thread overview]
Message-ID: <1383932419-12533-5-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1383932419-12533-1-git-send-email-markwalters1009@gmail.com>
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 8852703..a4f481b 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)
@@ -291,7 +291,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))
(desc (mapconcat #'identity desc-list "\n")))
(setq doc (replace-match desc 1 1 doc)))
--
1.7.9.1
next prev parent reply other threads:[~2013-11-08 17:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 17:40 [PATCH v3 0/7] emacs: help: remap keybindings Mark Walters
2013-11-08 17:40 ` [PATCH v3 1/7] emacs: help: check for nil key binding Mark Walters
2013-11-08 17:40 ` [PATCH v3 2/7] emacs: help: remove duplicate bindings Mark Walters
2013-11-08 17:40 ` [PATCH v3 3/7] emacs: help: split out notmuch-describe-key as a function Mark Walters
2013-11-08 17:40 ` Mark Walters [this message]
2013-11-08 17:40 ` [PATCH v3 5/7] emacs: help: add a special function to deal with remaps Mark Walters
2013-11-08 17:40 ` [PATCH v3 6/7] emacs: tree: use remap for the over-ridden global bindings Mark Walters
2013-11-08 17:40 ` [PATCH v3 7/7] emacs: help: base-keymap-test-help Mark Walters
2013-11-08 20:00 ` [PATCH v3 0/7] emacs: help: remap keybindings Austin Clements
2013-11-10 9:44 ` [PATCH] emacs: help: bugfix Mark Walters
2013-11-10 11:53 ` David Bremner
2013-11-12 18:47 ` Austin Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383932419-12533-5-git-send-email-markwalters1009@gmail.com \
--to=markwalters1009@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).