From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [Bug] Issues with format.el: coding system, byte/char confusi on Date: Mon, 14 Apr 2003 22:06:15 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <67B8CED503F3D511BB9F0008C75DAD6605485571@dewdfx17> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1050372407 23877 80.91.224.249 (15 Apr 2003 02:06:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2003 02:06:47 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 15 04:06:45 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 195FqP-0006Cy-00 for ; Tue, 15 Apr 2003 04:06:45 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 195Fs3-0002j4-00 for ; Tue, 15 Apr 2003 04:08:27 +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 195FqH-0003dT-06 for emacs-devel@quimby.gnus.org; Mon, 14 Apr 2003 22:06:37 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 195Fpx-0003c4-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 22:06:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 195Fpv-0003Zl-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 22:06:16 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 195Fpv-0003Zd-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 22:06:15 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 195Fpv-00046x-00; Mon, 14 Apr 2003 22:06:15 -0400 Original-To: "Wedler, Christoph" In-reply-to: <67B8CED503F3D511BB9F0008C75DAD6605485571@dewdfx17> (christoph.wedler@sap.com) 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:13236 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13236 > 3. The docstring of `after-insert-file-functions' includes "It should > return the new byte count", whereas `format-decode' returns the > new char count. > It looks like they are really both measured in characters. > I will fix some doc strings. In this case, you might also want to check (`position-bytes', but this might be OK): (defun after-insert-file-set-buffer-file-coding-system (inserted) ... (let ((pos-byte (position-bytes (+ (point) inserted)))) (set-buffer-multibyte nil) (setq inserted (- pos-byte (position-bytes (point)))))) (set-buffer-modified-p modified-p)))) inserted) If fixed this code, I think. Does the version now installed seem correct to you?