emacs-diffs
[Top][All Lists]
Advanced

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

master 41c09d347f 1/2: Make ido sorting respect ido-case-fold


From: Lars Ingebrigtsen
Subject: master 41c09d347f 1/2: Make ido sorting respect ido-case-fold
Date: Fri, 24 Jun 2022 14:18:27 -0400 (EDT)

branch: master
commit 41c09d347feb94b9070a9aa2c78ccf65be7fd268
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make ido sorting respect ido-case-fold
    
    * lisp/ido.el (ido-file-lessp):
    (ido-file-extension-lessp): Respect ido-case-fold (bug#47127).
---
 lisp/ido.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/ido.el b/lisp/ido.el
index f970fce1ed..b3365059d2 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3205,12 +3205,18 @@ instead removed from the current item list."
 ;; File list sorting
 
 (defun ido-file-lessp (a b)
-  ;; Simple compare two file names.
+  "Simple compare two file names."
+  (when ido-case-fold
+    (setq a (downcase a)
+          b (downcase b)))
   (string-lessp (ido-no-final-slash a) (ido-no-final-slash b)))
 
 
 (defun ido-file-extension-lessp (a b)
-  ;; Compare file names according to ido-file-extensions-order list.
+  "Compare file names according to ido-file-extensions-order list."
+  (when ido-case-fold
+    (setq a (downcase a)
+          b (downcase b)))
   (let ((n (compare-strings a 0 nil b 0 nil nil))
        lessp p)
     (if (eq n t)



reply via email to

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