mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
(revert-buffer): If a unibyte buffer is being reverted
with a coding system for multibyte, set buffer multibyte before calling insert-file-contents.
This commit is contained in:
parent
7acc677bf1
commit
e1ee3b548b
@ -1,3 +1,9 @@
|
||||
2006-10-30 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* files.el (revert-buffer): If a unibyte buffer is being reverted
|
||||
with a coding system for multibyte, set buffer multibyte before
|
||||
calling insert-file-contents.
|
||||
|
||||
2006-10-30 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* server.el (server-select-display): Use a dummy buffer to detect when
|
||||
|
@ -4094,6 +4094,15 @@ non-nil, it is called instead of rereading visited file contents."
|
||||
(if auto-save-p 'auto-save-coding
|
||||
(or coding-system-for-read
|
||||
buffer-file-coding-system-explicit))))
|
||||
(if (and (not enable-multibyte-characters)
|
||||
(not (memq (coding-system-base
|
||||
coding-system-for-read)
|
||||
'(no-conversion raw-text))))
|
||||
;; As a coding system suitable for multibyte
|
||||
;; buffer is specified, make the current
|
||||
;; buffer multibyte.
|
||||
(set-buffer-multibyte t))
|
||||
|
||||
;; This force after-insert-file-set-coding
|
||||
;; (called from insert-file-contents) to set
|
||||
;; buffer-file-coding-system to a proper value.
|
||||
|
Loading…
Reference in New Issue
Block a user