Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C5E2B431FD0 for ; Sun, 13 Mar 2011 22:10:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nGoTV3H+Kfna for ; Sun, 13 Mar 2011 22:10:33 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 52946431FB5 for ; Sun, 13 Mar 2011 22:10:33 -0700 (PDT) Received: by fxm11 with SMTP id 11so2821980fxm.26 for ; Sun, 13 Mar 2011 22:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=AziemhImU7fzGRaISXtVibhtZm0a2eJamQ8CUZLu/FM=; b=fEGs+EICIP5NVg5jH05R7EYheed5HtgAYYXkRD1Al7/eTUgqFH4TbyeIBeg5fCc1dL Xc8p0fM79z9LIqYM+Fbo3BTuW2JDpCPfOQs5NN3Bj9kqlDoimUwT5KmcRlT6cbAp0qtz DUei70C0QNbEQr2qlT1nmWfY5C0X9Z2dk10Cg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=cSMSTcO4ZPKlXeK1K64FPKYFoaXrglZtIF/s/hrT9TC/TWEFsk+AbLDCX3A8yZzrdc Il5dwLhPzw1V5ZBcMrvfxGshMCrYg6Cvau4NUgPW117o7nhDyURreFEQKRw6MVdRJcoc JGHWq5lrRnoVjjTShg5yVVLo9vAEGYLxsu/xA= MIME-Version: 1.0 Received: by 10.223.127.210 with SMTP id h18mr2716236fas.77.1300079432077; Sun, 13 Mar 2011 22:10:32 -0700 (PDT) Received: by 10.223.102.73 with HTTP; Sun, 13 Mar 2011 22:10:32 -0700 (PDT) Date: Mon, 14 Mar 2011 01:10:32 -0400 Message-ID: Subject: [PATCH] Save global match data when looking for the beginning of field. From: servilio To: notmuch Content-Type: text/plain; charset=UTF-8 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 05:10:38 -0000 Thus avoid disrupting usage of regular expressions functions elsewhere. --- emacs/notmuch-address.el | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 52e320d..2960da9 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -47,9 +47,9 @@ line." (defun notmuch-address-expand-name () (let* ((end (point)) (beg (save-excursion - (re-search-backward "\\(\\`\\|[\n:,]\\)[ \t]*") - (match-end 0) - )) + (save-match-data + (re-search-backward "\\(\\`\\|[\n:,]\\)[ \t]*") + (match-end 0)))) (orig (buffer-substring-no-properties beg end)) (completion-ignore-case t) (options (notmuch-address-options orig)) -- 1.7.4.1