]> git.eshelyaron.com Git - emacs.git/commitdiff
(ls-lisp-insert-directory): If -n switch is used, invoke
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 Jan 2008 13:15:27 +0000 (13:15 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 26 Jan 2008 13:15:27 +0000 (13:15 +0000)
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.

lisp/ChangeLog
lisp/ls-lisp.el

index 53c252cf725e3c75b836b03231c7996040061bf3..8a9c9f3f2c60a58c9641d67dc264b899a7724d5b 100644 (file)
@@ -1,3 +1,11 @@
+2008-01-26  Eli Zaretskii  <eliz@gnu.org>
+
+       * 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  <viniciusjl@ig.com.br>
 
        * blank-mode.el: New version 9.1.  Handle "long" line tail
index 302329b9bba20a0f4a2c081cf4a6dcd01965d27e..2963168a89984ad71a004ca59851f0a6b5afb10e 100644 (file)
@@ -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 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