]> git.eshelyaron.com Git - emacs.git/commitdiff
(revert-buffer): If a unibyte buffer is being reverted
authorKenichi Handa <handa@m17n.org>
Mon, 30 Oct 2006 07:40:14 +0000 (07:40 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 30 Oct 2006 07:40:14 +0000 (07:40 +0000)
with a coding system for multibyte, set buffer multibyte before
calling insert-file-contents.

lisp/ChangeLog
lisp/files.el

index acb3e5c3a991bc9cf7298ec50126d8a3da74b3eb..ad94208356614621adda3f64053e1ac6994ce4a3 100644 (file)
@@ -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
index 4b746225f60050439999a571c2c4c255eb5a8004..a78d798f38ba21bce5c30eac49c4a95740776f68 100644 (file)
@@ -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.