[PATCH] Save global match data when looking for the beginning of field.
servilio
servilio at gmail.com
Sun Mar 13 22:10:32 PDT 2011
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
More information about the notmuch
mailing list