Mercurial > emacs
changeset 46905:23b6ab646d7b
(recover-this-file): New function.
(after-find-file): Recommend recover-this-file.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 15 Aug 2002 20:08:24 +0000 |
parents | 7af0f250bfd0 |
children | 421ce085a3cc |
files | lisp/files.el |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Thu Aug 15 11:28:50 2002 +0000 +++ b/lisp/files.el Thu Aug 15 20:08:24 2002 +0000 @@ -1406,7 +1406,7 @@ (file-newer-than-file-p (or buffer-auto-save-file-name (make-auto-save-file-name)) buffer-file-name)) - (format "%s has auto save data; consider M-x recover-file" + (format "%s has auto save data; consider M-x recover-this-file" (file-name-nondirectory buffer-file-name)) (setq not-serious t) (if error "(New file)" nil))) @@ -3335,6 +3335,11 @@ (run-hooks 'revert-buffer-internal-hook)) t))))) +(defun recover-this-file () + "Recover the visited file--get contents from its last auto-save file." + (interactive) + (recover-file buffer-file-name)) + (defun recover-file (file) "Visit file FILE, but get contents from its last auto-save file." ;; Actually putting the file name in the minibuffer should be used