emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Bug] Issues with format.el: coding system, byte/char confusi on


From: Wedler, Christoph
Subject: RE: [Bug] Issues with format.el: coding system, byte/char confusi on
Date: Tue, 13 May 2003 19:18:20 +0200

Richard Stallman wrote:
 >>>> 1. Shouldn't `format-annotate-function' also save the buffer-local
 >>>> variable `buffer-file-coding-system' (as it does with
 >>>> `selective-display' and `enable-multibyte-characters' since v1.38)?

 > [...]

 > How about writing a patch to do this in general, and trying it out
 > for a while?  If it works well for you, we can install it.

        * format.el (format-annotate-function): Copy coding system into
        the new temp buffer.

- Christoph

diff -c format.el.~1.40~ format.el
*** format.el.~1.40~    Mon May  5 18:35:00 2003
--- format.el   Mon May  5 18:35:00 2003
***************
*** 223,232 ****
            (let ((copy-buf (get-buffer-create (format " *Format Temp %d*"
                                                       format-count)))
                  (sel-disp selective-display)
!                 (multibyte enable-multibyte-characters))
              (with-current-buffer copy-buf
                (setq selective-display sel-disp)
!               (set-buffer-multibyte multibyte))
              (copy-to-buffer copy-buf from to)
              (set-buffer copy-buf)
              (format-insert-annotations write-region-annotations-so-far from)
--- 223,234 ----
            (let ((copy-buf (get-buffer-create (format " *Format Temp %d*"
                                                       format-count)))
                  (sel-disp selective-display)
!                 (multibyte enable-multibyte-characters)
!                 (coding-system buffer-file-coding-system))
              (with-current-buffer copy-buf
                (setq selective-display sel-disp)
!               (set-buffer-multibyte multibyte)
!               (setq buffer-file-coding-system coding-system))
              (copy-to-buffer copy-buf from to)
              (set-buffer copy-buf)
              (format-insert-annotations write-region-annotations-so-far from)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]