Re: [PATCH v2] Omit User-Agent: header by default
[notmuch-archives.git] / e8 / 7efe39a93845e0b6792a33ec4a5cfd8d18052d
1 Return-Path: <markwalters1009@gmail.com>\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 1D917431FCF\r
6         for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:18:56 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id oPLmOAl2Dufm for <notmuch@notmuchmail.org>;\r
18         Tue, 12 Nov 2013 12:18:50 -0800 (PST)\r
19 Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com\r
20  [74.125.82.54])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  02317429E31    for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:18:43 -0800\r
23  (PST)\r
24 Received: by mail-wg0-f54.google.com with SMTP id y10so3049234wgg.9\r
25         for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:18:43 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28         bh=0N5rkZ+LVFKyfSYWkgjwKM8KZWEoiYd5aKylNLATPuU=;\r
29         b=wM/uqFu1ueFktwYdDEcfh+A+QMFfUwaKxsMMdY3TEIUVSsZkKy96LbnLQ9jklGP80w\r
30         U5yZCBeSapfHOstU+qHOzCQ8TImCdB0h/hrhXQt92bxZCv5J4NtadEteaOH1GGWbxnb7\r
31         v276QQ/qPwt5oskClu8Npg2EojHhpqmknRSRwyF5YcBC/+nQqvjBpnU9RdaZCO4qB48C\r
32         a7x2sN5NlEvaUqe8rSBoV9YgvuA7fB680K+Xohc3RdNoer+fRxf/7DROTglLFIifksba\r
33         i+fqbVpo7pMhe4CIpM/FaTvZ36VPtFfjmJX26oa9W8NaAlMmZRf2MLnn+3DNcwbdYv5x\r
34         vXCg==\r
35 X-Received: by 10.194.88.225 with SMTP id bj1mr3060539wjb.50.1384287074829;\r
36         Tue, 12 Nov 2013 12:11:14 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id\r
39         qc10sm48003836wic.9.2013.11.12.12.11.14 for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Tue, 12 Nov 2013 12:11:14 -0800 (PST)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v4 6/7] emacs: help: add a special function to deal with\r
45  remaps\r
46 Date: Tue, 12 Nov 2013 20:10:58 +0000\r
47 Message-Id: <1384287059-3525-7-git-send-email-markwalters1009@gmail.com>\r
48 X-Mailer: git-send-email 1.7.9.1\r
49 In-Reply-To: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>\r
50 References: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Tue, 12 Nov 2013 20:18:56 -0000\r
64 \r
65 remaps are a rather unusual keymap consisting of "first key" 'remap\r
66 and then "second-key" the remapped-function. Thus we do the\r
67 documentation for it separately.\r
68 ---\r
69  emacs/notmuch-lib.el |   22 ++++++++++++++++++++--\r
70  1 files changed, 20 insertions(+), 2 deletions(-)\r
71 \r
72 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
73 index 7b1fc33..33211c8 100644\r
74 --- a/emacs/notmuch-lib.el\r
75 +++ b/emacs/notmuch-lib.el\r
76 @@ -261,6 +261,21 @@ It does not prepend if ACTUAL-KEY is already listed in TAIL."\r
77             tail)))\r
78      tail)\r
79  \r
80 +(defun notmuch-describe-remaps (remap-keymap ua-keys base-keymap prefix tail)\r
81 +  ;; Remappings are represented as a binding whose first "event" is\r
82 +  ;; 'remap.  Hence, if the keymap has any remappings, it will have a\r
83 +  ;; binding whose "key" is 'remap, and whose "binding" is itself a\r
84 +  ;; keymap that maps not from keys to commands, but from old (remapped)\r
85 +  ;; functions to the commands to use in their stead.\r
86 +  (map-keymap\r
87 +   (lambda (command binding)\r
88 +     (mapc\r
89 +      (lambda (actual-key)\r
90 +       (setq tail (notmuch-describe-key actual-key binding prefix ua-keys tail)))\r
91 +      (where-is-internal command base-keymap)))\r
92 +   remap-keymap)\r
93 +  tail)\r
94 +\r
95  (defun notmuch-describe-keymap (keymap ua-keys base-keymap &optional prefix tail)\r
96    "Return a list of cons cells, each describing one binding in KEYMAP.\r
97  \r
98 @@ -277,8 +292,11 @@ prefix argument.  PREFIX and TAIL are used internally."\r
99       (cond ((mouse-event-p key) nil)\r
100            ((keymapp binding)\r
101             (setq tail\r
102 -                 (notmuch-describe-keymap\r
103 -                  binding ua-keys base-keymap (notmuch-prefix-key-description key) tail)))\r
104 +                 (if (eq key 'remap)\r
105 +                     (notmuch-describe-remaps\r
106 +                      binding ua-keys base-keymap prefix tail)\r
107 +                   (notmuch-describe-keymap\r
108 +                    binding ua-keys base-keymap (notmuch-prefix-key-description key) tail))))\r
109            (binding\r
110             (setq tail (notmuch-describe-key (vector key) binding prefix ua-keys tail)))))\r
111     keymap)\r
112 -- \r
113 1.7.9.1\r
114 \r