# HG changeset patch # User Geoff Voelker # Date 892790688 0 # Node ID 611b5f660ee6bc8e931fa3dc95886d416ad23485 # Parent ed3990c730969b5a5cd97895405bb04c4b52b9f8 (ls-lisp-dired-ignore-case): New variable. (ls-lisp-handle-switches): Obey ls-lisp-dired-ignore-case. diff -r ed3990c73096 -r 611b5f660ee6 lisp/ls-lisp.el --- a/lisp/ls-lisp.el Fri Apr 17 05:24:27 1998 +0000 +++ b/lisp/ls-lisp.el Fri Apr 17 05:24:48 1998 +0000 @@ -63,6 +63,9 @@ 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 @@ (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)