From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Some q:s about find-file-not-found-set-buffer-file-coding-system Date: Fri, 16 Jun 2006 21:51:30 +0200 Message-ID: <44930BC2.3040704@student.lu.se> References: <4492D326.4070208@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1150487515 878 80.91.229.2 (16 Jun 2006 19:51:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jun 2006 19:51:55 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 16 21:51:51 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FrKM7-0000Dn-06 for ged-emacs-devel@m.gmane.org; Fri, 16 Jun 2006 21:51:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FrKM6-0005m1-GR for ged-emacs-devel@m.gmane.org; Fri, 16 Jun 2006 15:51:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FrKLv-0005lm-6V for emacs-devel@gnu.org; Fri, 16 Jun 2006 15:51:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FrKLt-0005la-Uf for emacs-devel@gnu.org; Fri, 16 Jun 2006 15:51:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FrKLt-0005lX-PK for emacs-devel@gnu.org; Fri, 16 Jun 2006 15:51:33 -0400 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FrKVa-00009a-9I for emacs-devel@gnu.org; Fri, 16 Jun 2006 16:01:34 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.072.1) id 4492E9660000761A for emacs-devel@gnu.org; Fri, 16 Jun 2006 21:51:32 +0200 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Original-To: Emacs Devel In-Reply-To: <4492D326.4070208@student.lu.se> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55940 Archived-At: 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.