[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 93 / b342cb26980396d91580341f320516b2789d60
1 Return-Path: <dme@dme.org>\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 C991D431FD0\r
6         for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 03:37:23 -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.7\r
10 X-Spam-Level: \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 lmUb7pWXqBvd for <notmuch@notmuchmail.org>;\r
16         Fri, 30 Dec 2011 03:37:23 -0800 (PST)\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
18         [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 2B0E0431FB6\r
21         for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 03:37:23 -0800 (PST)\r
22 Received: by wibhq2 with SMTP id hq2so8207372wib.26\r
23         for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 03:37:22 -0800 (PST)\r
24 Received: by 10.180.19.138 with SMTP id f10mr107965975wie.3.1325245042064;\r
25         Fri, 30 Dec 2011 03:37:22 -0800 (PST)\r
26 Received: from hotblack-desiato.hh.sledj.net\r
27         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
28         by mx.google.com with ESMTPS id em4sm39222262wbb.20.2011.12.30.03.37.20\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Fri, 30 Dec 2011 03:37:21 -0800 (PST)\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
32         id D62B8A04DF; Fri, 30 Dec 2011 11:37:18 +0000 (GMT)\r
33 From: David Edmondson <dme@dme.org>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: [PATCH] emacs: Better handling of inherited keymaps for\r
36  `nomuch-help'.\r
37 Date: Fri, 30 Dec 2011 11:37:17 +0000\r
38 Message-Id: <1325245037-32680-1-git-send-email-dme@dme.org>\r
39 X-Mailer: git-send-email 1.7.7.3\r
40 In-Reply-To:\r
41  <87ei522v4t.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me>\r
42 References:\r
43  <87ei522v4t.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me>\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Fri, 30 Dec 2011 11:37:23 -0000\r
57 \r
58 `notmuch-hello-mode' inherits the keymap for widgets, which confused\r
59 `notmuch-substitute-command-keys'. Fix the confusion.\r
60 \r
61 Simplify `notmuch-substitute-command-keys' a little to make it easier\r
62 to read.\r
63 ---\r
64  emacs/notmuch.el |   17 ++++++++++++-----\r
65  1 files changed, 12 insertions(+), 5 deletions(-)\r
66 \r
67 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
68 index fde2377..6dd65ff 100644\r
69 --- a/emacs/notmuch.el\r
70 +++ b/emacs/notmuch.el\r
71 @@ -164,16 +164,23 @@ For a mouse binding, return nil."\r
72                 "\t"\r
73                 (notmuch-documentation-first-line action))))))\r
74  \r
75 -(defalias 'notmuch-substitute-one-command-key\r
76 -  (apply-partially 'notmuch-substitute-one-command-key-with-prefix nil))\r
77 +(defun notmuch-substitute-command-keys-one (key)\r
78 +  ;; A `keymap' key indicates inheritance from a parent keymap - the\r
79 +  ;; inherited mappings follow, so there is nothing to print for\r
80 +  ;; `keymap' itself.\r
81 +  (when (not (eq key 'keymap))\r
82 +    (notmuch-substitute-one-command-key-with-prefix nil key)))\r
83  \r
84  (defun notmuch-substitute-command-keys (doc)\r
85    "Like `substitute-command-keys' but with documentation, not function names."\r
86    (let ((beg 0))\r
87      (while (string-match "\\\\{\\([^}[:space:]]*\\)}" doc beg)\r
88 -      (let ((map (substring doc (match-beginning 1) (match-end 1))))\r
89 -       (setq doc (replace-match (mapconcat 'notmuch-substitute-one-command-key\r
90 -                                           (cdr (symbol-value (intern map))) "\n") 1 1 doc)))\r
91 +      (let* ((keymap-name (substring doc (match-beginning 1) (match-end 1)))\r
92 +            (keymap (symbol-value (intern keymap-name))))\r
93 +       (setq doc (replace-match\r
94 +                  (mapconcat #'notmuch-substitute-command-keys-one\r
95 +                             (cdr keymap) "\n")\r
96 +                  1 1 doc)))\r
97        (setq beg (match-end 0)))\r
98      doc))\r
99  \r
100 -- \r
101 1.7.7.3\r
102 \r