all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Bug] Issues with format.el: coding system, byte/char confusion
@ 2003-04-07 17:30 Wedler, Christoph
  2003-04-08  6:46 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Wedler, Christoph @ 2003-04-07 17:30 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-08  6:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-07 17:30 [Bug] Issues with format.el: coding system, byte/char confusion Wedler, Christoph
2003-04-08  6:46 ` Richard Stallman

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.