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
1e87edf5
Commit
1e87edf5
authored
May 24, 1999
by
Kenichi Handa
Browse files
(recover-file): Recover buffer-file-coding-system.
parent
596ff2ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lisp/files.el
lisp/files.el
+4
-1
No files found.
lisp/files.el
View file @
1e87edf5
...
@@ -2807,10 +2807,13 @@ non-nil, it is called instead of rereading visited file contents."
...
@@ -2807,10 +2807,13 @@ non-nil, it is called instead of rereading visited file contents."
(yes-or-no-p (format "Recover auto save file %s? " file-name)))
(yes-or-no-p (format "Recover auto save file %s? " file-name)))
(switch-to-buffer (find-file-noselect file t))
(switch-to-buffer (find-file-noselect file t))
(let ((buffer-read-only nil)
(let ((buffer-read-only nil)
;; Keep the current buffer-file-coding-system.
(coding-system buffer-file-coding-system)
;; Auto-saved file shoule be read without any code conversion.
;; Auto-saved file shoule be read without any code conversion.
(coding-system-for-read 'no-conversion))
(coding-system-for-read 'no-conversion))
(erase-buffer)
(erase-buffer)
(insert-file-contents file-name nil))
(insert-file-contents file-name nil)
(set-buffer-file-coding-system coding-system))
(after-find-file nil nil t))
(after-find-file nil nil t))
(t (error "Recover-file cancelled")))))
(t (error "Recover-file cancelled")))))
...
...
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