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 1C097431FD0
\r
6 for <notmuch@notmuchmail.org>; Thu, 29 Aug 2013 09:26:26 -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 JVa3NjFTpRmf for <notmuch@notmuchmail.org>;
\r
16 Thu, 29 Aug 2013 09:26:22 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id ACA77431FD6
\r
20 for <notmuch@notmuchmail.org>; Thu, 29 Aug 2013 09:26:08 -0700 (PDT)
\r
21 X-AuditID: 1209190f-b7fa58e000000953-3f-521f761eb429
\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
23 by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id EB.4E.02387.E167F125; Thu, 29 Aug 2013 12:26:06 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
26 by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r7TGQ3om025415;
\r
27 Thu, 29 Aug 2013 12:26:04 -0400
\r
28 Received: from drake.dyndns.org
\r
29 (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [216.15.114.40]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r7TGQ1NU015004
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Thu, 29 Aug 2013 12:26:02 -0400
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1VF52n-0007X2-69; Thu, 29 Aug 2013 12:26:01 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 8/9] emacs: Define a common shared keymap for all of notmuch
\r
41 Date: Thu, 29 Aug 2013 12:25:56 -0400
\r
42 Message-Id: <1377793557-28878-9-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
44 In-Reply-To: <1377793557-28878-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1377793557-28878-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixG6noitXJh9ksOyUqsX1mzOZHRg9nq26
\r
48 xRzAGMVlk5Kak1mWWqRvl8CVserpacaCmWIVqx8tZmxgbBPqYuTkkBAwkWj994MNwhaTuHBv
\r
49 PZDNxSEksI9R4veTgywQzkZGiUe3lrJDOHeYJP61T2CGcOYySky6sZsZpJ9NQENi2/7ljCC2
\r
50 iIC0xM67s1m7GDk4mAXUJP50qYCEhQV8JLpungIrYRFQlfg6oxOshFfAQeLJBxGIKxQlup9N
\r
51 ALuIU8BRov/uWxYQWwio5M/Fp+wTGPkXMDKsYpRNya3SzU3MzClOTdYtTk7My0st0jXRy80s
\r
52 0UtNKd3ECAoaTkn+HYzfDiodYhTgYFTi4e0IlA8SYk0sK67MPcQoycGkJMobWAIU4kvKT6nM
\r
53 SCzOiC8qzUktPsQowcGsJML7lhMox5uSWFmVWpQPk5LmYFES53329GygkEB6YklqdmpqQWoR
\r
54 TFaGg0NJgvc+yFDBotT01Iq0zJwShDQTByfIcB6g4f9AaniLCxJzizPTIfKnGBWlxHl/giQE
\r
55 QBIZpXlwvbCofsUoDvSKMK9kKVAVDzAhwHW/AhrMBDR4Qr4cyOCSRISUVAPjtFAxTgm/mIDC
\r
56 p7HiTxQVvms37z/SuNDxt16jyXVJnvKH6UpiU40OK3Nw3PzocYFP892NuK0Tbxs+F79kdWnF
\r
57 Nlfp1raWjl3Cut8eOQTu+VSmeuC3wY8VKzTWaHSEHfrQznZGYcpx8azpqWdVl2UtOZm6f9HG
\r
58 7SdPvbPe9uvs4r6HXb+ub5BmUGIpzkg01GIuKk4EAOp8ylPFAgAA
\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: Thu, 29 Aug 2013 16:26:26 -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 147e2dd..7a31d73 100644
\r
84 --- a/emacs/notmuch-hello.el
\r
85 +++ b/emacs/notmuch-hello.el
\r
86 @@ -510,8 +510,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