From: Richard M. Stallman Date: Thu, 15 Aug 2002 20:08:24 +0000 (+0000) Subject: (recover-this-file): New function. X-Git-Tag: ttn-vms-21-2-B4~13677 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=64d18e8f147643d45dc05ba227bf9a5fab84adf0;p=emacs.git (recover-this-file): New function. (after-find-file): Recommend recover-this-file. --- diff --git a/lisp/files.el b/lisp/files.el index 98cf8bfae56..b2b75ac3cd7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1406,7 +1406,7 @@ unless NOMODES is non-nil." (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 @@ non-nil, it is called instead of rereading visited file contents." (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