[PATCH] emacs: notmuch-hello: Use our own keymap.
authorNelson Elhage <nelhage@ksplice.com>
Fri, 14 May 2010 02:46:15 +0000 (22:46 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:03 +0000 (09:37 -0800)
bb/4c824d88c6c160863c0ff67bd53a898f335b4e [new file with mode: 0644]

diff --git a/bb/4c824d88c6c160863c0ff67bd53a898f335b4e b/bb/4c824d88c6c160863c0ff67bd53a898f335b4e
new file mode 100644 (file)
index 0000000..b41462e
--- /dev/null
@@ -0,0 +1,103 @@
+Return-Path: <nelhage@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 56A934196F4\r
+       for <notmuch@notmuchmail.org>; Thu, 13 May 2010 19:46:45 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.9\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id DL5rxnRTLs+G for <notmuch@notmuchmail.org>;\r
+       Thu, 13 May 2010 19:46:31 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU\r
+       [18.9.25.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id CA9AE4196F0\r
+       for <notmuch@notmuchmail.org>; Thu, 13 May 2010 19:46:31 -0700 (PDT)\r
+X-AuditID: 1209190c-b7bd2ae000005d05-c7-4becb98740f1\r
+Received: from mailhub-auth-3.mit.edu (MAILHUB-AUTH-3.MIT.EDU [18.9.21.43])\r
+       by dmz-mailsec-scanner-1.mit.edu (Symantec Brightmail Gateway) with\r
+       SMTP id A3.44.23813.789BCEB4; Thu, 13 May 2010 22:46:31 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id o4E2kVb9030879; \r
+       Thu, 13 May 2010 22:46:31 -0400\r
+Received: from PHANATIQUE.MIT.EDU (c-71-192-160-118.hsd1.nh.comcast.net\r
+       [71.192.160.118]) (authenticated bits=0)\r
+       (User authenticated as nelhage@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o4E2kTjc023163\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Thu, 13 May 2010 22:46:30 -0400 (EDT)\r
+From: Nelson Elhage <nelhage@ksplice.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: notmuch-hello: Use our own keymap.\r
+Date: Thu, 13 May 2010 22:46:15 -0400\r
+Message-Id: <1273805175-6660-1-git-send-email-nelhage@ksplice.com>\r
+X-Mailer: git-send-email 1.6.6.30.g1e6fd\r
+X-Brightmail-Tracker: AAAAARQpM2I=\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 14 May 2010 02:46:45 -0000\r
+\r
+Previously, we were adding our bindings directly to `widget-keymap',\r
+resulting in them being shared by anything else that used that keymap.\r
+---\r
+ emacs/notmuch-hello.el |   22 ++++++++++++++--------\r
+ 1 files changed, 14 insertions(+), 8 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+index 6a1c56e..56906c8 100644\r
+--- a/emacs/notmuch-hello.el\r
++++ b/emacs/notmuch-hello.el\r
+@@ -70,6 +70,19 @@\r
\r
+ (defvar notmuch-hello-recent-searches nil)\r
\r
++(defvar notmuch-hello-mode-map\r
++  (let ((map (make-sparse-keymap)))\r
++    (set-keymap-parent map widget-keymap)\r
++    (define-key map "=" 'notmuch-hello-update)\r
++    (define-key map "G" 'notmuch-hello-poll-and-update)\r
++    (define-key map "m" 'notmuch-mua-mail)\r
++    (define-key map "q" '(lambda () (interactive) (kill-buffer (current-buffer))))\r
++    (define-key map "s" 'notmuch-hello-goto-search)\r
++    (define-key map "v" '(lambda () (interactive)\r
++                           (message "notmuch version %s" (notmuch-version))))\r
++    map)\r
++  "Keymap for notmuch-hello buffer")\r
++\r
+ (defun notmuch-hello-remember-search (search)\r
+   (if (not (member search notmuch-hello-recent-searches))\r
+       (push search notmuch-hello-recent-searches))\r
+@@ -397,14 +410,7 @@ diagonal."\r
+       (let ((fill-column (- (window-width) notmuch-hello-indent)))\r
+         (center-region start (point))))\r
\r
+-      (use-local-map widget-keymap)\r
+-      (local-set-key "=" 'notmuch-hello-update)\r
+-      (local-set-key "G" 'notmuch-hello-poll-and-update)\r
+-      (local-set-key "m" 'notmuch-mua-mail)\r
+-      (local-set-key "q" '(lambda () (interactive) (kill-buffer (current-buffer))))\r
+-      (local-set-key "s" 'notmuch-hello-goto-search)\r
+-      (local-set-key "v" '(lambda () (interactive)\r
+-                          (message "notmuch version %s" (notmuch-version))))\r
++      (use-local-map notmuch-hello-mode-map)\r
\r
+       (widget-setup)\r
\r
+-- \r
+1.6.6.30.g1e6fd\r
+\r