From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Romain Francoise Newsgroups: gmane.emacs.devel Subject: Re: Should `auto-coding-functions' be mode-specific? Date: Sun, 07 Jan 2007 14:47:26 +0100 Organization: orebokech dot com Message-ID: <87k5zzq781.fsf@pacem.orebokech.com> References: <87ejqd88iv.fsf@pacem.orebokech.com> <87irfn5ggf.fsf@pacem.orebokech.com> <8764bkeydx.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168177623 12891 80.91.229.12 (7 Jan 2007 13:47:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2007 13:47:03 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 07 14:47:00 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H3YMT-0005qd-Lj for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2007 14:46:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3YMT-00028u-5z for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2007 08:46:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H3YME-00026q-Ix for emacs-devel@gnu.org; Sun, 07 Jan 2007 08:46:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H3YMD-00024d-5C for emacs-devel@gnu.org; Sun, 07 Jan 2007 08:46:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3YMC-00024S-SQ for emacs-devel@gnu.org; Sun, 07 Jan 2007 08:46:40 -0500 Original-Received: from [82.67.41.165] (helo=yeast.orebokech.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H3YMC-0004H8-8A for emacs-devel@gnu.org; Sun, 07 Jan 2007 08:46:40 -0500 Original-Received: from pacem.orebokech.com (pacem.orebokech.com [192.168.1.3]) by yeast.orebokech.com (Postfix) with ESMTP id 7967B13065 for ; Sun, 7 Jan 2007 14:46:39 +0100 (CET) Original-Received: by pacem.orebokech.com (Postfix, from userid 1000) id AA350524C2; Sun, 7 Jan 2007 14:47:26 +0100 (CET) Original-To: emacs-devel@gnu.org X-Face: }9mYu,e_@+e!`Z-P5kVXa3\_b:hdJ"B)ww[&=b<2=awG:GOIM (Juri Linkov's message of "Sun\, 07 Jan 2007 01\:33\:55 +0200") 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:64910 Archived-At: Juri Linkov writes: > The reported bug can occur even without my change because " was not anchored at the beginning of the buffer and can match > " But then why not to go further and use the same regexp as used for > detecting HTML files in `magic-mode-alist'? It seems reasonable > to detect the HTML encoding exactly in the same files that later > recognized as HTML according to the file contents. I think it's a good idea, and it is easy to do (see below). But it would reopen your original issue: that encoding detection doesn't work in Mozilla bookmark files. Index: lisp/international/mule.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/international/mule.el,v retrieving revision 1.250 diff -c -r1.250 mule.el *** lisp/international/mule.el 5 Jan 2007 17:58:02 -0000 1.250 --- lisp/international/mule.el 7 Jan 2007 13:43:29 -0000 *************** *** 2292,2309 **** ;; In case of no header, search only 10 lines. (forward-line 10)) (point)))) ! ;; Make sure that the buffer really contains an HTML document, by ! ;; checking that it starts with a doctype or a start tag ! ;; (allowing for whitespace at bob). Note: 'DOCTYPE NETSCAPE' is ! ;; useful for Mozilla bookmark files. ! (when (and (re-search-forward "\\`[[:space:]\n]*\\( | The sea! the sea! the open it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the | ever free! --Bryan W. Procter