emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 4f3db7f 195/350: Save match data around ebdb-parse


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 4f3db7f 195/350: Save match data around ebdb-parse-i18n
Date: Mon, 14 Aug 2017 11:46:35 -0400 (EDT)

branch: externals/ebdb
commit 4f3db7ffefdb825394003d816330df63d19ad2f1
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Save match data around ebdb-parse-i18n
    
    * ebdb-i18n.el (ebdb-parse-i18n): Parse methods are likely to using
      regexp matching, save match data around them.
---
 ebdb-i18n.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ebdb-i18n.el b/ebdb-i18n.el
index 8a7401b..ed9b0f1 100644
--- a/ebdb-i18n.el
+++ b/ebdb-i18n.el
@@ -77,6 +77,11 @@ This method should return a new instance of CLASS.")
 (cl-defgeneric ebdb-delete-field-i18n (field record spec unload)
   "An internationalized version of `ebdb-delete-field'.")
 
+(cl-defmethod ebdb-parse-i18n :around (_class _string _spec)
+  "Don't clobber match data when testing names."
+  (save-match-data
+    (cl-call-next-method)))
+
 ;;;###autoload
 (defun ebdb-internationalize-addresses ()
   "Go through all the EBDB contacts and \"internationalize\"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]