Mercurial > emacs
diff lisp/files.el @ 73544:98080162e827
(revert-buffer): If a unibyte buffer is being reverted
with a coding system for multibyte, set buffer multibyte before
calling insert-file-contents.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 30 Oct 2006 07:39:33 +0000 |
parents | c51c8fa9c1f1 |
children | b0468ec2cd04 02cf29720f31 |
line wrap: on
line diff
--- a/lisp/files.el Mon Oct 30 07:29:37 2006 +0000 +++ b/lisp/files.el Mon Oct 30 07:39:33 2006 +0000 @@ -4094,6 +4094,15 @@ (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.