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 E6F1A431FD7
\r
6 for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 13:09:21 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 iOdVf57jraqu for <notmuch@notmuchmail.org>;
\r
18 Tue, 12 Nov 2013 13:09:14 -0800 (PST)
\r
19 Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com
\r
20 [74.125.82.49]) (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 3AB81431FCF for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 13:09:14 -0800
\r
24 Received: by mail-wg0-f49.google.com with SMTP id x13so2605807wgg.4
\r
25 for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 13:09:13 -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=+NeEEIgUeu4WjHSxL8tkh5julgWpcSqKo+LYSv+rm84=;
\r
29 b=qLmUfddh8ee9LkL/fqo3cGE5YuJOGDb7f+guTy7OxPtsV6ZxulYzMfvXj+3nWPF4iv
\r
30 3v08/Pu8AKCxj/fyQH4aIl4yKqILY161zhmQn/GaG4P0vySnw+D5qlXDBGEjnwKJIye3
\r
31 ljZXVnamFGs6km40KC+3Oh4KF/lGsLEDVhjBr86cSxs9q65d/qa0Nu5fIHqTpGJ/fYAg
\r
32 MbiHeJuNFJOSWJtEZPuYyrneW543SWKR8G0ZZ+laxmi7TTLdBKmKx3EtRt1fCEMOq5ah
\r
33 MJGrN3lT3nxbpN1xuUuf6z8MrIA5wa1CXvgB9Q2wVW5MWjC7NKaX4UhKHP/9j+Pr0Vak
\r
35 X-Received: by 10.180.20.13 with SMTP id j13mr17563452wie.8.1384287068405;
\r
36 Tue, 12 Nov 2013 12:11:08 -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 c10sm48157218wie.11.2013.11.12.12.11.07 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Tue, 12 Nov 2013 12:11:08 -0800 (PST)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v4 2/7] emacs: help: save-match-data
\r
45 Date: Tue, 12 Nov 2013 20:10:54 +0000
\r
46 Message-Id: <1384287059-3525-3-git-send-email-markwalters1009@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.9.1
\r
48 In-Reply-To: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>
\r
49 References: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Tue, 12 Nov 2013 21:09:22 -0000
\r
64 The routines that construct the help page in notmuch-lib rely on
\r
65 match-data being preserved across some fairly complicated code. This
\r
66 is currently valid but will not be when this series is finished. Thus
\r
67 place everything between the string-match and replace-match inside a
\r
70 emacs/notmuch-lib.el | 12 +++++++-----
\r
71 1 files changed, 7 insertions(+), 5 deletions(-)
\r
73 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
74 index 5e734b3..6abc4ea 100644
\r
75 --- a/emacs/notmuch-lib.el
\r
76 +++ b/emacs/notmuch-lib.el
\r
77 @@ -274,11 +274,13 @@ prefix argument. PREFIX and TAIL are used internally."
\r
78 "Like `substitute-command-keys' but with documentation, not function names."
\r
80 (while (string-match "\\\\{\\([^}[:space:]]*\\)}" doc beg)
\r
81 - (let* ((keymap-name (substring doc (match-beginning 1) (match-end 1)))
\r
82 - (keymap (symbol-value (intern keymap-name)))
\r
83 - (ua-keys (where-is-internal 'universal-argument keymap t))
\r
84 - (desc-list (notmuch-describe-keymap keymap ua-keys))
\r
85 - (desc (mapconcat #'identity desc-list "\n")))
\r
88 + (let* ((keymap-name (substring doc (match-beginning 1) (match-end 1)))
\r
89 + (keymap (symbol-value (intern keymap-name)))
\r
90 + (ua-keys (where-is-internal 'universal-argument keymap t))
\r
91 + (desc-list (notmuch-describe-keymap keymap ua-keys)))
\r
92 + (mapconcat #'identity desc-list "\n")))))
\r
93 (setq doc (replace-match desc 1 1 doc)))
\r
94 (setq beg (match-end 0)))
\r