From 10f7c7fc296a638aa3b4142576b43a04cc18254f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 10 Feb 1995 06:29:31 +0000 Subject: [PATCH] (recover-file): Use ordinary `f' to read file name. --- lisp/files.el | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 35a43d9ed6e..18933c87a95 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1982,15 +1982,10 @@ beginning and `after-revert-hook' at the end." (defun recover-file (file) "Visit file FILE, but get contents from its last auto-save file." - (interactive - (let ((prompt-file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and prompt-file - (setq file-name (file-name-nondirectory prompt-file) - file-dir (file-name-directory prompt-file))) - (list (read-file-name "Recover file: " - file-dir nil nil file-name)))) + ;; Actually putting the file name in the minibuffer should be used + ;; only rarely. + ;; Not just because users often use the default. + (interactive "fRecover file: ") (setq file (expand-file-name file)) (if (auto-save-file-name-p (file-name-nondirectory file)) (error "%s is an auto-save file" file))