From 98532b1215a5fdc5e8fd23c9ba9fdab3d73f665a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 10 Aug 2000 10:44:49 +0000 Subject: [PATCH] (recover-file): Call insert-directory instead of invoking `ls' directly. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) 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) -- 2.39.2