aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-hello.el
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2013-09-03 17:45:24 -0400
committerGravatar David Bremner <bremner@debian.org>2013-09-10 08:07:28 -0300
commitc52fee6bcb3565ce19801b86d83d5783e48df320 (patch)
treeede2d8543995a816937e9bdf5bfa4abf6362e675 /emacs/notmuch-hello.el
parent69c52c56f2a7defe03e8e5e2ab470a7eeb4c55fb (diff)
emacs: Define a common shared keymap for all of notmuch
This defines a single, currently empty keymap that all other notmuch mode maps inherit from.
Diffstat (limited to 'emacs/notmuch-hello.el')
-rw-r--r--emacs/notmuch-hello.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 6a7b884c..46baf559 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -515,8 +515,14 @@ Such a list can be computed with `notmuch-hello-query-counts'."
(defvar notmuch-hello-mode-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map widget-keymap)
+ (let ((map (if (fboundp 'make-composed-keymap)
+ ;; Inherit both widget-keymap and notmuch-common-keymap
+ (make-composed-keymap widget-keymap)
+ ;; Before Emacs 24, keymaps didn't support multiple
+ ;; inheritance,, so just copy the widget keymap since
+ ;; it's unlikely to change.
+ (copy-keymap widget-keymap))))
+ (set-keymap-parent map notmuch-common-keymap)
(define-key map "v" (lambda () "Display the notmuch version" (interactive)
(message "notmuch version %s" (notmuch-version))))
(define-key map "?" 'notmuch-help)