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

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

[nongnu] elpa/recomplete 296ed0ecce: Fix recomplete-impl-case-style modi


From: ELPA Syncer
Subject: [nongnu] elpa/recomplete 296ed0ecce: Fix recomplete-impl-case-style modifying match data
Date: Wed, 31 May 2023 22:02:33 -0400 (EDT)

branch: elpa/recomplete
commit 296ed0ecce65066f513182bbde2045fca9c1e035
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix recomplete-impl-case-style modifying match data
---
 recomplete.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/recomplete.el b/recomplete.el
index 6cef0eb8bc..1018f7cb64 100644
--- a/recomplete.el
+++ b/recomplete.el
@@ -242,12 +242,14 @@ Argument FN-CACHE stores the result for reuse."
              (word-split
               (mapcar
                #'downcase
-               (split-string (string-trim (replace-regexp-in-string
-                                           "\\([[:lower:]]\\)\\([[:upper:]]\\)"
-                                           "\\1_\\2"
-                                           word-init)
-                                          "_")
-                             "[_\\-]"))))
+               ;; `split-string' modified match-data.
+               (save-match-data
+                 (split-string (string-trim (replace-regexp-in-string
+                                             
"\\([[:lower:]]\\)\\([[:upper:]]\\)"
+                                             "\\1_\\2"
+                                             word-init)
+                                            "_")
+                               "[_\\-]")))))
 
         (push (string-join (mapcar #'capitalize word-split) "") result-choices)
 



reply via email to

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