]> git.eshelyaron.com Git - emacs.git/commitdiff
(recover-file): Call insert-directory instead of
authorEli Zaretskii <eliz@gnu.org>
Thu, 10 Aug 2000 10:44:49 +0000 (10:44 +0000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 10 Aug 2000 10:44:49 +0000 (10:44 +0000)
invoking `ls' directly.

lisp/ChangeLog
lisp/files.el

index b137e471204fba55aa743fe2f5203020f6a95e2b..0eb7b4aacd337b0a4107e0f6b722d472eafbcb3a 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-10  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * files.el (recover-file): Call insert-directory instead of
+       invoking `ls' directly.
+
 2000-08-10  Miles Bader  <miles@gnu.org>
 
        * comint.el (comint-highlight-prompt, comint-highlight-prompt-face)
index 3c78f4ba099296061eaee7ba00f865fed166e153..6292588e3694beccf09ba4f30469702d15fb2343 100644 (file)
@@ -3030,12 +3030,15 @@ non-nil, it is called instead of rereading visited file contents."
             (not (file-exists-p file-name)))
           (error "Auto-save file %s not current" file-name))
          ((save-window-excursion
-            (if (not (memq system-type '(vax-vms windows-nt)))
-                (with-output-to-temp-buffer "*Directory*"
-                  (buffer-disable-undo standard-output)
-                  (call-process "ls" nil standard-output nil
-                                (if (file-symlink-p file) "-lL" "-l")
-                                file file-name)))
+            (with-output-to-temp-buffer "*Directory*"
+              (buffer-disable-undo standard-output)
+              (save-excursion
+                (let ((switches dired-listing-switches))
+                  (if (file-symlink-p file)
+                      (setq switches (concat switches "L")))
+                  (set-buffer standard-output)
+                  (insert-directory file switches)
+                  (insert-directory file-name switches))))
             (yes-or-no-p (format "Recover auto save file %s? " file-name)))
           (switch-to-buffer (find-file-noselect file t))
           (let ((buffer-read-only nil)