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

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

[nongnu] elpa/recomplete b5451170ef: Fix #2: recomplete-case-style error


From: ELPA Syncer
Subject: [nongnu] elpa/recomplete b5451170ef: Fix #2: recomplete-case-style error
Date: Sun, 10 Sep 2023 04:00:33 -0400 (EDT)

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

    Fix #2: recomplete-case-style error
    
    It's important the replacement is case sensitive.
    I didn't notice this problem during development as I had this set in my
    configuration.
---
 recomplete.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/recomplete.el b/recomplete.el
index 9c98bc6e56..780e024276 100644
--- a/recomplete.el
+++ b/recomplete.el
@@ -245,10 +245,12 @@ Argument FN-CACHE stores the result for reuse."
                #'downcase
                ;; `split-string' modified match-data.
                (save-match-data
-                 (split-string (string-trim (replace-regexp-in-string
-                                             
"\\([[:lower:]]\\)\\([[:upper:]]\\)"
-                                             "\\1_\\2"
-                                             word-init)
+                 ;; Setting `case-fold-search' is needed for replace to work 
properly, see #2.
+                 (split-string (string-trim (let ((case-fold-search nil))
+                                              (replace-regexp-in-string
+                                               
"\\([[:lower:]]\\)\\([[:upper:]]\\)"
+                                               "\\1_\\2"
+                                               word-init))
                                             "_")
                                "[_\\-]")))))
 



reply via email to

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