unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Colin Walters <walters@gnu.org>
Subject: Re: auto-detecting encoding for XML
Date: 20 May 2002 18:32:49 -0400	[thread overview]
Message-ID: <1021933969.24344.3490.camel@space-ghost> (raw)
In-Reply-To: <200205201423.g4KENCL27469@rum.cs.yale.edu>

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.

  reply	other threads:[~2002-05-20 22:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-19  2:27 auto-detecting encoding for XML Colin Walters
2002-05-19 23:13 ` Stefan Monnier
2002-05-20  4:53   ` Eli Zaretskii
2002-05-20  7:04   ` Colin Walters
2002-05-20 14:23     ` Stefan Monnier
2002-05-20 22:32       ` Colin Walters [this message]
2002-05-21 19:43         ` Stefan Monnier
2002-05-20 10:10   ` Kai Großjohann
2002-05-20 12:59     ` Eli Zaretskii
2002-05-20 14:31       ` Kai Großjohann
2002-05-20 14:32         ` Eli Zaretskii
2002-05-20 14:18     ` Stefan Monnier
2002-05-20 14:29       ` Kai Großjohann
2002-05-20 14:32         ` Stefan Monnier
2002-05-20 15:26       ` Kai Großjohann
2002-05-20 22:18         ` Colin Walters
2002-05-20 22:09       ` Colin Walters
2002-05-20  4:48 ` Eli Zaretskii
2002-05-20  7:07   ` Colin Walters
2002-05-20 14:48 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1021933969.24344.3490.camel@space-ghost \
    --to=walters@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).