X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e5108ff1e4ac0c17361a703e565fda78112812db..dcefd2bbc0e404c26f1e5b68c910404355f488fb:/lisp/ls-lisp.el diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index d4b890504a..11cbea0b37 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -1,6 +1,6 @@ ;;; ls-lisp.el --- emulate insert-directory completely in Emacs Lisp -;; Copyright (C) 1992, 1994, 2000-2015 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 2000-2016 Free Software Foundation, Inc. ;; Author: Sebastian Kremer ;; Modified by: Francis J. Wright @@ -72,7 +72,7 @@ (defcustom ls-lisp-emulation (cond ;; ((eq system-type 'windows-nt) 'MS-Windows) - ((memq system-type '(hpux usg-unix-v irix berkeley-unix)) + ((memq system-type '(hpux usg-unix-v berkeley-unix)) 'UNIX)) ; very similar to GNU ;; Anything else defaults to nil, meaning GNU. "Platform to emulate: GNU (default), MacOS, MS-Windows, UNIX. @@ -144,7 +144,7 @@ value to get similar behavior. When this option is non-nil, and `ls-lisp-use-string-collate' is also non-nil, the collation order produced on MS-Windows will ignore punctuation and symbol characters, which will, for example, place -\`.foo' near `foo'. See the documentation of `string-collate-lessp' +`.foo' near `foo'. See the documentation of `string-collate-lessp' and `w32-collate-ignore-punctuation' for more details. This option is ignored on platforms other than MS-Windows; to @@ -222,7 +222,7 @@ current year. The OLD-TIME-FORMAT is used for older files. To use ISO 8601 dates, you could set: \(setq ls-lisp-format-time-list - '(\"%Y-%m-%d %H:%M\" + \\='(\"%Y-%m-%d %H:%M\" \"%Y-%m-%d \"))" :type '(list (string :tag "Early time format") (string :tag "Old time format")) @@ -348,7 +348,9 @@ SWITCHES is a *list* of characters. TIME-INDEX is the time index into file-attributes according to SWITCHES. WILDCARD-REGEXP is nil or an *Emacs regexp*. FULL-DIRECTORY-P means file is a directory and SWITCHES does not contain `d', so that a full listing is expected." - (if (or wildcard-regexp full-directory-p) + (if (or (and wildcard-regexp + (not (string= "[^~]\\'" wildcard-regexp))) ; Switch -B pseudo-wildcard regexp + full-directory-p) (let* ((dir (file-name-as-directory file)) (default-directory dir) ; so that file-attributes works (file-alist @@ -539,7 +541,7 @@ Responds to the window width as ls should but may not!" "Return t if string S1 should sort before string S2. Case is significant if `ls-lisp-ignore-case' is nil. Uses `string-collate-lessp' if `ls-lisp-use-string-collate' is non-nil, -\`compare-strings' otherwise. +`compare-strings' otherwise. On GNU/Linux systems, if the locale specifies UTF-8 as the codeset, the sorting order will place together file names that differ only by punctuation characters, like `.emacs' and `emacs'. To have a