changeset 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 fa022f5f8164
children 2e69863a9b4f
files lisp/files.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
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.