[PATCH] Save global match data when looking for the beginning of field.
[notmuch-archives.git] / ba / 254df0e6563823d3e7bc13da760ddf848ab143
1 Return-Path: <servilio@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 C5E2B431FD0\r
6         for <notmuch@notmuchmail.org>; Sun, 13 Mar 2011 22:10:37 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id nGoTV3H+Kfna for <notmuch@notmuchmail.org>;\r
17         Sun, 13 Mar 2011 22:10:33 -0700 (PDT)\r
18 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com\r
19         [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 52946431FB5\r
22         for <notmuch@notmuchmail.org>; Sun, 13 Mar 2011 22:10:33 -0700 (PDT)\r
23 Received: by fxm11 with SMTP id 11so2821980fxm.26\r
24         for <notmuch@notmuchmail.org>; Sun, 13 Mar 2011 22:10:32 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:mime-version:date:message-id:subject:from:to\r
27         :content-type; bh=AziemhImU7fzGRaISXtVibhtZm0a2eJamQ8CUZLu/FM=;\r
28         b=fEGs+EICIP5NVg5jH05R7EYheed5HtgAYYXkRD1Al7/eTUgqFH4TbyeIBeg5fCc1dL\r
29         Xc8p0fM79z9LIqYM+Fbo3BTuW2JDpCPfOQs5NN3Bj9kqlDoimUwT5KmcRlT6cbAp0qtz\r
30         DUei70C0QNbEQr2qlT1nmWfY5C0X9Z2dk10Cg=\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
32         h=mime-version:date:message-id:subject:from:to:content-type;\r
33         b=cSMSTcO4ZPKlXeK1K64FPKYFoaXrglZtIF/s/hrT9TC/TWEFsk+AbLDCX3A8yZzrdc\r
34         Il5dwLhPzw1V5ZBcMrvfxGshMCrYg6Cvau4NUgPW117o7nhDyURreFEQKRw6MVdRJcoc\r
35         JGHWq5lrRnoVjjTShg5yVVLo9vAEGYLxsu/xA=\r
36 MIME-Version: 1.0\r
37 Received: by 10.223.127.210 with SMTP id h18mr2716236fas.77.1300079432077;\r
38         Sun, 13 Mar 2011 22:10:32 -0700 (PDT)\r
39 Received: by 10.223.102.73 with HTTP; Sun, 13 Mar 2011 22:10:32 -0700 (PDT)\r
40 Date: Mon, 14 Mar 2011 01:10:32 -0400\r
41 Message-ID: <AANLkTi=ftNF3yUo2q4u-Yr57fRZvjsTnH6oPOmfj_3se@mail.gmail.com>\r
42 Subject: [PATCH] Save global match data when looking for the beginning of\r
43         field.\r
44 From: servilio <servilio@gmail.com>\r
45 To: notmuch <notmuch@notmuchmail.org>\r
46 Content-Type: text/plain; charset=UTF-8\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Mon, 14 Mar 2011 05:10:38 -0000\r
60 \r
61 Thus avoid disrupting usage of regular expressions functions\r
62 elsewhere.\r
63 ---\r
64  emacs/notmuch-address.el |    6 +++---\r
65  1 files changed, 3 insertions(+), 3 deletions(-)\r
66 \r
67 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
68 index 52e320d..2960da9 100644\r
69 --- a/emacs/notmuch-address.el\r
70 +++ b/emacs/notmuch-address.el\r
71 @@ -47,9 +47,9 @@ line."\r
72  (defun notmuch-address-expand-name ()\r
73    (let* ((end (point))\r
74          (beg (save-excursion\r
75 -               (re-search-backward "\\(\\`\\|[\n:,]\\)[ \t]*")\r
76 -               (match-end 0)\r
77 -               ))\r
78 +               (save-match-data\r
79 +                 (re-search-backward "\\(\\`\\|[\n:,]\\)[ \t]*")\r
80 +                 (match-end 0))))\r
81          (orig (buffer-substring-no-properties beg end))\r
82          (completion-ignore-case t)\r
83          (options (notmuch-address-options orig))\r
84 -- \r
85 1.7.4.1\r