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: Some q:s about find-file-not-found-set-buffer-file-coding-system Date: Fri, 16 Jun 2006 17:49:58 +0200 Message-ID: <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 1150473033 14386 80.91.229.2 (16 Jun 2006 15:50:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jun 2006 15:50:33 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 16 17:50:20 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 1FrGaQ-0008SQ-Lr for ged-emacs-devel@m.gmane.org; Fri, 16 Jun 2006 17:50:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FrGaQ-0000wE-9L for ged-emacs-devel@m.gmane.org; Fri, 16 Jun 2006 11:50:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FrGaB-0000vS-LA for emacs-devel@gnu.org; Fri, 16 Jun 2006 11:50:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FrGa9-0000t2-BR for emacs-devel@gnu.org; Fri, 16 Jun 2006 11:50:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FrGa9-0000sj-6U for emacs-devel@gnu.org; Fri, 16 Jun 2006 11:50:01 -0400 Original-Received: from [81.228.11.98] (helo=pne-smtpout1-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FrGjn-0005sH-Bq for emacs-devel@gnu.org; Fri, 16 Jun 2006 11:59:59 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn1.fre.skanova.net (7.2.072.1) id 44892B96001ECBD0 for emacs-devel@gnu.org; Fri, 16 Jun 2006 17:49:59 +0200 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Original-To: Emacs Devel 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:55936 Archived-At: 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.