From: Eli Zaretskii Date: Sat, 26 Jan 2008 13:15:27 +0000 (+0000) Subject: (ls-lisp-insert-directory): If -n switch is used, invoke X-Git-Tag: emacs-pretest-23.0.90~8395 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de4db6f103a1e99e675d7f02731be130e3b9d102;p=emacs.git (ls-lisp-insert-directory): If -n switch is used, invoke directory-files-and-attributes with last argument `integer' instead of `string'. (insert-directory): Add -n to the list of supported switches mentioned in the doc string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53c252cf725..8a9c9f3f2c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2008-01-26 Eli Zaretskii + + * ls-lisp.el (ls-lisp-insert-directory): If -n switch is used, + invoke directory-files-and-attributes with last argument `integer' + instead of `string'. + (insert-directory): Add -n to the list of supported switches + mentioned in the doc string. + 2008-01-26 Vinicius Jose Latorre * blank-mode.el: New version 9.1. Handle "long" line tail diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 302329b9bba..2963168a899 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -209,7 +209,7 @@ The Lisp emulation does not run any external programs or shells. It supports ordinary shell wildcards if `ls-lisp-support-shell-wildcards' is non-nil; otherwise, it interprets wildcards as regular expressions to match file names. It does not support all `ls' switches -- those -that work are: A a c i r S s t u U X g G B C R and F partly." +that work are: A a c i r S s t u U X g G B C R n and F partly." (if ls-lisp-use-insert-directory-program (funcall original-insert-directory file switches wildcard full-directory-p) @@ -286,7 +286,10 @@ not contain `d', so that a full listing is expected." (let* ((dir (file-name-as-directory file)) (default-directory dir) ; so that file-attributes works (file-alist - (directory-files-and-attributes dir nil wildcard-regexp t 'string)) + (directory-files-and-attributes dir nil wildcard-regexp t + (if (memq ?n switches) + 'integer + 'string))) (now (current-time)) (sum 0) ;; do all bindings here for speed