[PATCH 4/4] contrib: pick: use remap for the over-ridden global bindings

Mark Walters markwalters1009 at gmail.com
Sat Oct 26 14:04:39 PDT 2013


Following a suggestion by Austin in id:20130915153642.GY1426 at mit.edu
we use remap for the over-riding bindings in pick. This means that if
the user modifies the global keymap these modifications will happen in
the pick versions of them too.

[Pick overrides these to do things like close the message pane before
doing the action, so the functionality is very close to the original
common keymap function.]
---
 contrib/notmuch-pick/notmuch-pick.el |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
index 156ea6d..73f6501 100644
--- a/contrib/notmuch-pick/notmuch-pick.el
+++ b/contrib/notmuch-pick/notmuch-pick.el
@@ -226,13 +226,13 @@ FUNC."
     (set-keymap-parent map notmuch-common-keymap)
     ;; The following override the global keymap.
     ;; Override because we want to close message pane first.
-    (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))
+    (define-key map [remap notmuch-help] (notmuch-pick-close-message-pane-and #'notmuch-help))
     ;; Override because we first close message pane and then close pick buffer.
-    (define-key map "q" 'notmuch-pick-quit)
+    (define-key map [remap notmuch-kill-this-buffer] 'notmuch-pick-quit)
     ;; Override because we close message pane after the search query is entered.
-    (define-key map "s" 'notmuch-pick-to-search)
+    (define-key map [remap notmuch-search] 'notmuch-pick-to-search)
     ;; Override because we want to close message pane first.
-    (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))
+    (define-key map [remap notmuch-mua-new-mail] (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))
 
     ;; these use notmuch-show functions directly
     (define-key map "|" 'notmuch-show-pipe-message)
-- 
1.7.9.1



More information about the notmuch mailing list