Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
10f7c7fc
Commit
10f7c7fc
authored
Feb 10, 1995
by
Richard M. Stallman
Browse files
(recover-file): Use ordinary `f' to read file name.
parent
a7a39fbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
lisp/files.el
lisp/files.el
+4
-9
No files found.
lisp/files.el
View file @
10f7c7fc
...
@@ -1982,15 +1982,10 @@ beginning and `after-revert-hook' at the end."
...
@@ -1982,15 +1982,10 @@ beginning and `after-revert-hook' at the end."
(
defun
recover-file
(
file
)
(
defun
recover-file
(
file
)
"Visit file FILE, but get contents from its last auto-save file."
"Visit file FILE, but get contents from its last auto-save file."
(
interactive
;; Actually putting the file name in the minibuffer should be used
(
let
((
prompt-file
buffer-file-name
)
;; only rarely.
(
file-name
nil
)
;; Not just because users often use the default.
(
file-dir
nil
))
(
interactive
"fRecover file: "
)
(
and
prompt-file
(
setq
file-name
(
file-name-nondirectory
prompt-file
)
file-dir
(
file-name-directory
prompt-file
)))
(
list
(
read-file-name
"Recover file: "
file-dir
nil
nil
file-name
))))
(
setq
file
(
expand-file-name
file
))
(
setq
file
(
expand-file-name
file
))
(
if
(
auto-save-file-name-p
(
file-name-nondirectory
file
))
(
if
(
auto-save-file-name-p
(
file-name-nondirectory
file
))
(
error
"%s is an auto-save file"
file
))
(
error
"%s is an auto-save file"
file
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment