aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/files.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-08-15 20:08:24 +0000
committerRichard M. Stallman <[email protected]>2002-08-15 20:08:24 +0000
commit64d18e8f147643d45dc05ba227bf9a5fab84adf0 (patch)
treeafc14902bba025bf2cd6f7340e79d99ff6ad0688 /lisp/files.el
parent70c06e3955a2970576310a8aa05f483564f622aa (diff)
(recover-this-file): New function.
(after-find-file): Recommend recover-this-file.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 98cf8bfae5..b2b75ac3cd 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