Make ido sorting respect ido-case-fold
* lisp/ido.el (ido-file-lessp): (ido-file-extension-lessp): Respect ido-case-fold (bug#47127).
This commit is contained in:
parent
c7f141d678
commit
41c09d347f
1 changed files with 8 additions and 2 deletions
10
lisp/ido.el
10
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue