1 Return-Path: <amdragon@mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id D3D96429E45
\r
6 for <notmuch@notmuchmail.org>; Tue, 3 Sep 2013 14:45:57 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id fveB9nO3PtuG for <notmuch@notmuchmail.org>;
\r
16 Tue, 3 Sep 2013 14:45:53 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id 8F7EC431E62
\r
20 for <notmuch@notmuchmail.org>; Tue, 3 Sep 2013 14:45:34 -0700 (PDT)
\r
21 X-AuditID: 12074422-b7ef78e000000935-00-5226587ca042
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 2B.AC.02357.C7856225; Tue, 3 Sep 2013 17:45:32 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r83LjU0f023522;
\r
27 Tue, 3 Sep 2013 17:45:30 -0400
\r
28 Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r83LjRj3026860
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Tue, 3 Sep 2013 17:45:28 -0400
\r
34 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1VGyPe-0004yC-WA; Tue, 03 Sep 2013 17:45:26 -0400
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH v2 8/9] emacs: Define a common shared keymap for all of
\r
41 Date: Tue, 3 Sep 2013 17:45:24 -0400
\r
42 Message-Id: <1378244725-18846-9-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
44 In-Reply-To: <1378244725-18846-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1378244725-18846-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsUixCmqrVsToRZkcOaJlkXTdGeL1XN5LK7f
\r
48 nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK2Pms/+MBTPFKt5PPsDSwNgm
\r
49 1MXIySEhYCLx+PEURghbTOLCvfVsXYxcHEIC+xgl9i68xAzhbGCUONF9FipzmEniyKzNUM5c
\r
50 RolZFy6wgvSzCWhIbNu/HGyWiIC0xM67s8HizALREkcuz2ADsYUF/CX2PrwJFmcRUJV48foc
\r
51 WJxXwEHi0fV57BB3KEp0P5sAFucUcJToXbAILC4EVNO08jL7BEb+BYwMqxhlU3KrdHMTM3OK
\r
52 U5N1i5MT8/JSi3RN9XIzS/RSU0o3MYKCi91FaQfjz4NKhxgFOBiVeHgZHqkGCbEmlhVX5h5i
\r
53 lORgUhLlPRKqFiTEl5SfUpmRWJwRX1Sak1p8iFGCg1lJhDfBByjHm5JYWZValA+TkuZgURLn
\r
54 ffb0bKCQQHpiSWp2ampBahFMVoaDQ0mCtzwcqFGwKDU9tSItM6cEIc3EwQkynAdo+M8wkOHF
\r
55 BYm5xZnpEPlTjIpS4rzzQZoFQBIZpXlwvbDof8UoDvSKMG8PSBUPMHHAdb8CGswENDjtsyrI
\r
56 4JJEhJRUA6Ogi/uiVW/nTSxIPebB4rRfUUGR9/BxEb5/868abb4scFTya9HPCO6Du947H75z
\r
57 +fWls97hz7LeXXRaG9VsvHJtzaq89xahV059aheb/+Hgnt+fF7ZZvG+XittecSMnQHdLxsvv
\r
58 Py8vNPhX/S55t8ruE1sPszJ8DOY30n5woyujQGDWJOWrOVc2K7EUZyQaajEXFScCAATGEMbZ AgAA
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Tue, 03 Sep 2013 21:45:58 -0000
\r
73 This defines a single, currently empty keymap that all other notmuch
\r
74 mode maps inherit from.
\r
76 emacs/notmuch-hello.el | 10 ++++++++--
\r
77 emacs/notmuch-lib.el | 5 +++++
\r
78 emacs/notmuch-show.el | 1 +
\r
79 emacs/notmuch.el | 1 +
\r
80 4 files changed, 15 insertions(+), 2 deletions(-)
\r
82 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
83 index 6a7b884..46baf55 100644
\r
84 --- a/emacs/notmuch-hello.el
\r
85 +++ b/emacs/notmuch-hello.el
\r
86 @@ -515,8 +515,14 @@ Such a list can be computed with `notmuch-hello-query-counts'."
\r
89 (defvar notmuch-hello-mode-map
\r
90 - (let ((map (make-sparse-keymap)))
\r
91 - (set-keymap-parent map widget-keymap)
\r
92 + (let ((map (if (fboundp 'make-composed-keymap)
\r
93 + ;; Inherit both widget-keymap and notmuch-common-keymap
\r
94 + (make-composed-keymap widget-keymap)
\r
95 + ;; Before Emacs 24, keymaps didn't support multiple
\r
96 + ;; inheritance,, so just copy the widget keymap since
\r
97 + ;; it's unlikely to change.
\r
98 + (copy-keymap widget-keymap))))
\r
99 + (set-keymap-parent map notmuch-common-keymap)
\r
100 (define-key map "v" (lambda () "Display the notmuch version" (interactive)
\r
101 (message "notmuch version %s" (notmuch-version))))
\r
102 (define-key map "?" 'notmuch-help)
\r
103 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
104 index 782badb..2bf1d2f 100644
\r
105 --- a/emacs/notmuch-lib.el
\r
106 +++ b/emacs/notmuch-lib.el
\r
107 @@ -128,6 +128,11 @@ For example, if you wanted to remove an \"inbox\" tag and add an
\r
108 :group 'notmuch-search
\r
109 :group 'notmuch-show)
\r
111 +(defvar notmuch-common-keymap
\r
112 + (let ((map (make-sparse-keymap)))
\r
114 + "Keymap shared by all notmuch modes.")
\r
116 ;; By default clicking on a button does not select the window
\r
117 ;; containing the button (as opposed to clicking on a widget which
\r
118 ;; does). This means that the button action is then executed in the
\r
119 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
120 index 380df66..9f67340 100644
\r
121 --- a/emacs/notmuch-show.el
\r
122 +++ b/emacs/notmuch-show.el
\r
123 @@ -1264,6 +1264,7 @@ reset based on the original query."
\r
125 (defvar notmuch-show-mode-map
\r
126 (let ((map (make-sparse-keymap)))
\r
127 + (set-keymap-parent map notmuch-common-keymap)
\r
128 (define-key map "?" 'notmuch-help)
\r
129 (define-key map "q" 'notmuch-kill-this-buffer)
\r
130 (define-key map (kbd "<C-tab>") 'widget-backward)
\r
131 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
132 index 0304096..e098bd7 100644
\r
133 --- a/emacs/notmuch.el
\r
134 +++ b/emacs/notmuch.el
\r
135 @@ -198,6 +198,7 @@ first line of documentation for the bound function."
\r
137 (defvar notmuch-search-mode-map
\r
138 (let ((map (make-sparse-keymap)))
\r
139 + (set-keymap-parent map notmuch-common-keymap)
\r
140 (define-key map "?" 'notmuch-help)
\r
141 (define-key map "q" 'notmuch-kill-this-buffer)
\r
142 (define-key map "x" 'notmuch-kill-this-buffer)
\r