From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Colin Walters Newsgroups: gmane.emacs.devel Subject: Re: auto-detecting encoding for XML Date: 20 May 2002 18:32:49 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <1021933969.24344.3490.camel@space-ghost> References: <1021775271.29752.2282.camel@space-ghost> <200205192313.g4JNDmk24770@rum.cs.yale.edu> <1021878296.16796.2926.camel@space-ghost> <200205201423.g4KENCL27469@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1021934519 6841 127.0.0.1 (20 May 2002 22:41:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 May 2002 22:41:59 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179vqp-0001mE-00 for ; Tue, 21 May 2002 00:41:59 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179w4y-0002yj-00 for ; Tue, 21 May 2002 00:56:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179vr9-0005y8-00; Mon, 20 May 2002 18:42:19 -0400 Original-Received: from monk.debian.net ([216.185.54.61] helo=monk.verbum.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179vpJ-0005ju-00 for ; Mon, 20 May 2002 18:40:25 -0400 Original-Received: from space-ghost.verbum.private (freedom.cis.ohio-state.edu [164.107.60.183]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "space-ghost.verbum.org", Issuer "monk.verbum.org" (verified OK)) by monk.verbum.org (Postfix (Debian/GNU)) with ESMTP id 979A574000BA for ; Mon, 20 May 2002 18:40:24 -0400 (EDT) Original-Received: by space-ghost.verbum.private (Postfix (Debian/GNU), from userid 1000) id 3E8168000A0; Mon, 20 May 2002 18:32:50 -0400 (EDT) Original-To: emacs-devel@gnu.org In-Reply-To: <200205201423.g4KENCL27469@rum.cs.yale.edu> X-Mailer: Ximian Evolution 1.0.3 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4222 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4222 On Mon, 2002-05-20 at 10:23, Stefan Monnier wrote: > No, it could just use the match-data directly. Ugh. Relying on `match-data' doesn't appeal to me at all. > I was thinking of it the other way: the function will most likely need > to do a regexp search anyway, so why not include it with > the auto-coding-regexp-alist. The main point of allowing arbitrary elisp functions is that you're *not* limited to just doing a regexp search. With your method, if someone wanted to write a function which did some sort of minimal "real" parsing, then they would have to add a null regexp or something to `auto-coding-regexp-alist' just so their function would be called. > Yes, I know it's tricky. But maybe we can come up with something clever. > In the mean time, I agree that extending auto-coding-regexp-alist is maybe > the best approach. Errr...I never said that extending `auto-coding-regexp-alist' was the best solution; I think it's not as clean as having a separate `auto-coding-functions'. The best solution is something that links the coding detection functions with the major modes, but that will be very difficult to implement cleanly, while the `auto-coding-functions' solves at least one case in a clean way. But this isn't an important enough issue to spend time debating; it is mostly an aesthetic issue. If you are really adamant that extending `auto-coding-regexp-alist' is better than `auto-coding-functions', go ahead and install that instead of my patch.