In article <[EMAIL PROTECTED]>, Peter Dyballa <[EMAIL PROTECTED]> writes:

> When I open a text file with a CP1250 contents, mode-line does not  
> show a specific encoding, it starts with ``-:´´. So I invoke C-x REF  
> r cp1250 RET – but there does not seem to be change (except that read- 
> only goes away).

In article <[EMAIL PROTECTED]>, Eli Zaretskii <[EMAIL PROTECTED]> writes:

> It seems that this problem is somehow related to the fact that Emacs
> initially visits the file in unibyte mode.

Right.  I've just installed the attached fix.  Or, should we
change insert-file-contents?

---
Kenichi Handa
[EMAIL PROTECTED]

2006-10-30  Kenichi Handa  <[EMAIL PROTECTED]>

        * 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.

*** files.el    20 Oct 2006 11:10:12 +0900      1.862
--- files.el    30 Oct 2006 16:37:46 +0900      
***************
*** 4094,4099 ****
--- 4094,4108 ----
                          (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.


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to