mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
(ls-lisp-dired-ignore-case): New variable.
(ls-lisp-handle-switches): Obey ls-lisp-dired-ignore-case.
This commit is contained in:
parent
0627db9cd2
commit
97b927b3fa
1 changed files with 12 additions and 4 deletions
|
|
@ -63,6 +63,9 @@ nil means they are treated as Emacs regexps (for backward compatibility).
|
|||
This variable is checked by \\[insert-directory] only when `ls-lisp.el'
|
||||
package is used.")
|
||||
|
||||
(defvar ls-lisp-dired-ignore-case nil
|
||||
"Non-nil causes dired buffers to sort alphabetically regardless of case.")
|
||||
|
||||
(defun insert-directory (file &optional switches wildcard full-directory-p)
|
||||
"Insert directory listing for FILE, formatted according to SWITCHES.
|
||||
Leaves point after the inserted text.
|
||||
|
|
@ -188,10 +191,15 @@ are: A a c i r S s t u"
|
|||
(ls-lisp-time-lessp (nth index (cdr y))
|
||||
(nth index (cdr x))))))
|
||||
(t ; sorted alphabetically
|
||||
(function
|
||||
(lambda (x y)
|
||||
(string-lessp (car x)
|
||||
(car y)))))))))
|
||||
(if ls-lisp-dired-ignore-case
|
||||
(function
|
||||
(lambda (x y)
|
||||
(string-lessp (upcase (car x))
|
||||
(upcase (car y)))))
|
||||
(function
|
||||
(lambda (x y)
|
||||
(string-lessp (car x)
|
||||
(car y))))))))))
|
||||
(if (memq ?r switches) ; reverse sort order
|
||||
(setq file-alist (nreverse file-alist)))
|
||||
file-alist)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue