mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 06:20:43 -08:00
(revert-buffer): Before calling insert-file-contents,
kill the local variable buffer-file-coding-system.
This commit is contained in:
parent
8d239c89c6
commit
1eb0bebc79
1 changed files with 6 additions and 0 deletions
|
|
@ -3305,6 +3305,12 @@ non-nil, it is called instead of rereading visited file contents."
|
||||||
;; any code conversion.
|
;; any code conversion.
|
||||||
(if auto-save-p 'emacs-mule-unix
|
(if auto-save-p 'emacs-mule-unix
|
||||||
coding-system-for-read)))
|
coding-system-for-read)))
|
||||||
|
;; This force
|
||||||
|
;; after-insert-file-set-buffer-file-coding-system
|
||||||
|
;; (called from insert-file-contents) to set
|
||||||
|
;; buffer-file-coding-system to a proper value.
|
||||||
|
(kill-local-variable 'buffer-file-coding-system)
|
||||||
|
|
||||||
;; Note that this preserves point in an intelligent way.
|
;; Note that this preserves point in an intelligent way.
|
||||||
(if preserve-modes
|
(if preserve-modes
|
||||||
(let ((buffer-file-format buffer-file-format))
|
(let ((buffer-file-format buffer-file-format))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue