unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Wedler, Christoph" <christoph.wedler@sap.com>
Subject: [Bug] Issues with format.el: coding system, byte/char confusion
Date: Mon, 7 Apr 2003 19:30:31 +0200	[thread overview]
Message-ID: <67B8CED503F3D511BB9F0008C75DAD6605485568@dewdfx17> (raw)

[Test using Emacs-21.2.95.1, with head revision of: format.el,v 1.40,
fileio.c,v 1.479]

There are some issues with format.el:

 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)?

 2. To compute the coding system of the current buffer, Emacs adds
    function `after-insert-file-set-buffer-file-coding-system' to
    `after-insert-file-functions'.  Is this correct?

    In the DEFUN for "insert-file-contents" in fileio.c, Emacs first
    calls Qformat_decode and then the functions in
    `after-insert-file-functions'.  In other words, we have the
    following call sequence:

     - decode functions using format.el,
     - decode functions in `after-insert-file-functions' before
       `after-insert-file-set-buffer-file-coding-system',
     - Emacs determines the coding system with
       `after-insert-file-set-buffer-file-coding-system',
     - decode functions in `after-insert-file-functions' after
       `after-insert-file-set-buffer-file-coding-system'

    I would assume that the coding system must be determined before any
    of the decode functions have been executed...  Or does it simply not
    matter when `after-insert-file-set-buffer-file-coding-system' is
    called?

 3. The docstring of `after-insert-file-functions' includes "It should
    return the new byte count", whereas `format-decode' returns the
    new char count.

    In the DEFUN for "insert-file-contents" in fileio.c, the invocations
    of Qformat_decode and the functions in Vafter_insert_file_functions
    (and the use of the return value `inserted') look quite similar...

    Which is correct for both: byte count or char count?  (I hope the
    latter, you might want to check
    `after-insert-file-set-buffer-file-coding-system' in this case.)

- Christoph

             reply	other threads:[~2003-04-07 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-07 17:30 Wedler, Christoph [this message]
2003-04-08  6:46 ` [Bug] Issues with format.el: coding system, byte/char confusion Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67B8CED503F3D511BB9F0008C75DAD6605485568@dewdfx17 \
    --to=christoph.wedler@sap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).