all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Some q:s about find-file-not-found-set-buffer-file-coding-system
@ 2006-06-16 15:49 Lennart Borgman
  2006-06-16 19:51 ` Lennart Borgman
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Borgman @ 2006-06-16 15:49 UTC (permalink / raw)


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.

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

* Re: Some q:s about find-file-not-found-set-buffer-file-coding-system
  2006-06-16 15:49 Some q:s about find-file-not-found-set-buffer-file-coding-system Lennart Borgman
@ 2006-06-16 19:51 ` Lennart Borgman
  0 siblings, 0 replies; 2+ messages in thread
From: Lennart Borgman @ 2006-06-16 19:51 UTC (permalink / raw)


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.

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

end of thread, other threads:[~2006-06-16 19:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-16 15:49 Some q:s about find-file-not-found-set-buffer-file-coding-system Lennart Borgman
2006-06-16 19:51 ` Lennart Borgman

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.