emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some q:s about find-file-not-found-set-buffer-file-coding-system


From: Lennart Borgman
Subject: Re: Some q:s about find-file-not-found-set-buffer-file-coding-system
Date: Fri, 16 Jun 2006 21:51:30 +0200
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

Lennart Borgman wrote:
I believe this function is w32 specific?

1) In the beginning of this function there is a statement

   (set-buffer (current-buffer))

What does this do?

2) This function is only used in the (obsolete) hook `find-file-not-found-hooks'. The functions added to this non-normal hook is run until one of the functions return non-nil. I believe this function does not reflect this. Should it not do that?

3) This function sets buffer-file-coding-system eol type based on untranslated-file-p only (avoiding this if coding-system-for-read or inhibit-eol-conversion is set). Is there a way to set this based on the file name? Otherwise, could this be added?

4) In addition to setting buffer-file-coding-system it sets buffer-file-type. That actually breaks the return value in 2 above since it is done last. It is also a bit surprising.

5) buffer-file-type is in my opinion a not very good name. Maybe buffer-file-binary would be easier to understand? The variable is used in very few places in Emacs.

Since I have use for the functionality I suggested above I have implemented it separately at the moment in a file named emacsw32-eol.el which is here:

   http://ourcomments.org/Emacs/DL/elisp/w32/

I think this should go into dos-w32.el however.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]