]> git.eshelyaron.com Git - emacs.git/commitdiff
(recover-this-file): New function.
authorRichard M. Stallman <rms@gnu.org>
Thu, 15 Aug 2002 20:08:24 +0000 (20:08 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 15 Aug 2002 20:08:24 +0000 (20:08 +0000)
(after-find-file): Recommend recover-this-file.

lisp/files.el

index 98cf8bfae568e65eea19e5d966a6ef0ad406d1f3..b2b75ac3cd7bf64191457a7bf18fc10f8e5684c3 100644 (file)
@@ -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