From: Nelson Elhage <nelhage@MIT.EDU>
Date: Fri, 14 May 2010 17:15:38 +0000 (-0400)
Subject: emacs: notmuch-hello: Make widget-keymap a parent of notmuch-hello-keymap
X-Git-Tag: 0.4~129
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=9ccd978665103a209861b1ea7e1fb3776018bba9;p=notmuch-old

emacs: notmuch-hello: Make widget-keymap a parent of notmuch-hello-keymap

This lets us pick up later changes to widget-keymap if the user
customizes it in some way. This is the recommended way to use
`widget-keymap', according to its help.
---

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 02d8f0c4..aa270727 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -262,7 +262,8 @@ should be. Returns a cons cell `(tags-per-line width)'."
 
 
 (defvar notmuch-hello-mode-map
-  (let ((map (copy-keymap widget-keymap)))
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map widget-keymap)
     (define-key map "v" '(lambda () "Display the notmuch version" (interactive)
                            (message "notmuch version %s" (notmuch-version))))
     (define-key map "?" 'notmuch-help)