# HG changeset patch # User Richard M. Stallman # Date 1029442104 0 # Node ID 23b6ab646d7b69ae80f48219956e82c88f4f5bb2 # Parent 7af0f250bfd01ae0d0d8b83f8c21669b924c2ead (recover-this-file): New function. (after-find-file): Recommend recover-this-file. diff -r 7af0f250bfd0 -r 23b6ab646d7b lisp/files.el --- 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