diff options
| author | Richard M. Stallman | 1995-02-10 06:29:31 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-02-10 06:29:31 +0000 |
| commit | 10f7c7fc296a638aa3b4142576b43a04cc18254f (patch) | |
| tree | 9c0aa9bb2bed5eec9a996b70534ed14a2acbf500 | |
| parent | a7a39fbe879c1fc7170b51e4fecab3c1991e0459 (diff) | |
| download | emacs-10f7c7fc296a638aa3b4142576b43a04cc18254f.tar.gz emacs-10f7c7fc296a638aa3b4142576b43a04cc18254f.zip | |
(recover-file): Use ordinary `f' to read file name.
| -rw-r--r-- | lisp/files.el | 13 |
1 files 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." | |||
| 1982 | 1982 | ||
| 1983 | (defun recover-file (file) | 1983 | (defun recover-file (file) |
| 1984 | "Visit file FILE, but get contents from its last auto-save file." | 1984 | "Visit file FILE, but get contents from its last auto-save file." |
| 1985 | (interactive | 1985 | ;; Actually putting the file name in the minibuffer should be used |
| 1986 | (let ((prompt-file buffer-file-name) | 1986 | ;; only rarely. |
| 1987 | (file-name nil) | 1987 | ;; Not just because users often use the default. |
| 1988 | (file-dir nil)) | 1988 | (interactive "fRecover file: ") |
| 1989 | (and prompt-file | ||
| 1990 | (setq file-name (file-name-nondirectory prompt-file) | ||
| 1991 | file-dir (file-name-directory prompt-file))) | ||
| 1992 | (list (read-file-name "Recover file: " | ||
| 1993 | file-dir nil nil file-name)))) | ||
| 1994 | (setq file (expand-file-name file)) | 1989 | (setq file (expand-file-name file)) |
| 1995 | (if (auto-save-file-name-p (file-name-nondirectory file)) | 1990 | (if (auto-save-file-name-p (file-name-nondirectory file)) |
| 1996 | (error "%s is an auto-save file" file)) | 1991 | (error "%s is an auto-save file" file)) |