Commit 64d18e8f authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(recover-this-file): New function.

(after-find-file): Recommend recover-this-file.
parent 70c06e39
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment