# HG changeset patch # User Kenichi Handa # Date 1162193973 0 # Node ID 98080162e827f17fbf7794e2f94b4de42aff41b8 # Parent fa022f5f8164083284cab7a568d61ee4ecbdbe5a (revert-buffer): If a unibyte buffer is being reverted with a coding system for multibyte, set buffer multibyte before calling insert-file-contents. diff -r fa022f5f8164 -r 98080162e827 lisp/files.el --- 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.