From: Eli Zaretskii Date: Thu, 10 Aug 2000 10:44:49 +0000 (+0000) Subject: (recover-file): Call insert-directory instead of X-Git-Tag: emacs-pretest-21.0.90~2370 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=98532b1215a5fdc5e8fd23c9ba9fdab3d73f665a;p=emacs.git (recover-file): Call insert-directory instead of invoking `ls' directly. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b137e471204..0eb7b4aacd3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-08-10 Eli Zaretskii + + * files.el (recover-file): Call insert-directory instead of + invoking `ls' directly. + 2000-08-10 Miles Bader * comint.el (comint-highlight-prompt, comint-highlight-prompt-face) diff --git a/lisp/files.el b/lisp/files.el index 3c78f4ba099..6292588e369 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)