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

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

[elpa] externals/ebdb 4688493 125/350: Wrap ebdb-parse in save-match-dat


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 4688493 125/350: Wrap ebdb-parse in save-match-data
Date: Mon, 14 Aug 2017 11:46:20 -0400 (EDT)

branch: externals/ebdb
commit 46884939a032aecd7aaaeddc2ce5392605f695dc
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Wrap ebdb-parse in save-match-data
    
    * ebdb.el (ebdb-parse): Add :around method so parsing doesn't clobber
      match data.
---
 ebdb.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ebdb.el b/ebdb.el
index c229b80..5eb756f 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -511,6 +511,10 @@ into SLOTS, provided that SLOTS does not already contain 
relevant
 values (ie, parsing should not override what's already in SLOTS).
 Then call `cl-call-next-method' with the new values.")
 
+(cl-defmethod ebdb-parse :around (_field-class _str &optional _slots)
+  (save-match-data
+    (cl-call-next-method)))
+
 (cl-defmethod ebdb-parse ((field-class (subclass ebdb-field)) _str &optional 
slots)
   "Create the actual field instance."
   (apply 'make-instance field-class slots))



reply via email to

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