[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto-detecting encoding for XML
From: |
Colin Walters |
Subject: |
Re: auto-detecting encoding for XML |
Date: |
20 May 2002 18:32:49 -0400 |
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.
- auto-detecting encoding for XML, Colin Walters, 2002/05/19
- Re: auto-detecting encoding for XML, Kai Großjohann, 2002/05/20
- Re: auto-detecting encoding for XML, Stefan Monnier, 2002/05/20
- Re: auto-detecting encoding for XML, Kai Großjohann, 2002/05/20
- Re: auto-detecting encoding for XML, Stefan Monnier, 2002/05/20
- Re: auto-detecting encoding for XML, Kai Großjohann, 2002/05/20
- Re: auto-detecting encoding for XML, Colin Walters, 2002/05/20