"Richard M. Stallman" <[EMAIL PROTECTED]> writes:

> Would someone who uses Windows see if this is still broken?

> Putting # -*-coding: utf-8;-*- construct on the second line with
> shebang #! on the first line is ineffective.

It seems to work now.

Trying to save such a file produces a warning about the coding tag not
matching buffer-file-coding-system:

   Selected encoding iso-latin-1-dos disagrees with utf-8-dos
   specified by file contents.  Really save (else edit coding cookies
   and try again)? (y or n)

I don't like this message for two reasons:


1. It is not clear what will happen if I press y. Will the file be saved
   as iso-latin-1 or utf-8?

2. It suggests editing the coding cookies, but if I have just created
   a new file and added a coding cookie, it is more likely that the
   coding cookie is correct, and it is buffer-file-coding-system that I
   want to change.

I think it might be better to not display this message at all if all
the characters in the buffer can be encoded in the coding-system
specified in the coding tag. If the file had a coding tag before it
was read, then the buffer-file-coding-system will have been set
appropriately. So the only case where this can happen is when the user
(or lisp code) adds such a cookie themselves, in which case they will
always want to save the buffer in the encoding they specifed.



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to