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

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

[nongnu] elpa/undo-fu-session aefda294ef 2/2: Fix undo-fu-session-incomp


From: ELPA Syncer
Subject: [nongnu] elpa/undo-fu-session aefda294ef 2/2: Fix undo-fu-session-incompatible-files case sensitivity
Date: Thu, 4 May 2023 10:03:09 -0400 (EDT)

branch: elpa/undo-fu-session
commit aefda294efbfafb8b2cde3ec0d389eccc418d092
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix undo-fu-session-incompatible-files case sensitivity
    
    On case insensitive filesystems the REGEX match is now case insensitive.
---
 changelog.rst      |  4 ++++
 undo-fu-session.el | 15 ++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/changelog.rst b/changelog.rst
index 7a92bff0f9..6d33f3265d 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -3,6 +3,10 @@
 Change Log
 ##########
 
+- In development.
+
+  - The ``undo-fu-session-incompatible-files`` match is now case insensitive 
for case insensitive file-systems.
+
 - Version 0.5 (2023-04-05)
 
   - Fix bug when ``undo-fu-session-linear`` was disabled,
diff --git a/undo-fu-session.el b/undo-fu-session.el
index 6d022dfbaa..158538dbc3 100755
--- a/undo-fu-session.el
+++ b/undo-fu-session.el
@@ -440,13 +440,14 @@ Argument PENDING-LIST an `pending-undo-list' compatible 
list."
 (defun undo-fu-session--match-file-name (filename test-files)
   "Return t if FILENAME match any item in TEST-FILES."
   (catch 'found
-    (dolist (matcher test-files)
-      (when (cond
-             ((stringp matcher)
-              (string-match-p matcher filename))
-             (t
-              (funcall matcher filename)))
-        (throw 'found t)))))
+    (let ((case-fold-search (file-name-case-insensitive-p filename)))
+      (dolist (matcher test-files)
+        (when (cond
+               ((stringp matcher)
+                (string-match-p matcher filename))
+               (t
+                (funcall matcher filename)))
+          (throw 'found t))))))
 
 (defun undo-fu-session--directory-ensure ()
   "Ensure the undo directory has been created."



reply via email to

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