From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Wedler, Christoph" Newsgroups: gmane.emacs.devel Subject: RE: [Bug] Issues with format.el: coding system, byte/char confusi on Date: Tue, 13 May 2003 19:18:20 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <67B8CED503F3D511BB9F0008C75DAD6605485600@dewdfx17> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: main.gmane.org 1052847541 11632 80.91.224.249 (13 May 2003 17:39:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 13 May 2003 17:39:01 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 13 19:38:58 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19FdhT-0002oO-00 for ; Tue, 13 May 2003 19:36:27 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19FdoS-0006f1-00 for ; Tue, 13 May 2003 19:43:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Fde6-0002oV-0C for emacs-devel@quimby.gnus.org; Tue, 13 May 2003 13:32:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19FdZS-0001K2-00 for emacs-devel@gnu.org; Tue, 13 May 2003 13:28:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19FdYy-0000mk-00 for emacs-devel@gnu.org; Tue, 13 May 2003 13:27:41 -0400 Original-Received: from smtpde02.sap-ag.de ([155.56.68.170]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FdQ8-0005Yv-00; Tue, 13 May 2003 13:18:33 -0400 Original-Received: from sap-ag.de (smtpde02) by smtpde02.sap-ag.de (out) with ESMTP id TAA20721; Tue, 13 May 2003 19:18:47 +0200 (MESZ) Original-To: "'rms@gnu.org'" X-Mailer: Internet Mail Service (5.5.2656.59) X-SAP: out X-SAP: out X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13837 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13837 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)