Ar an cúigiú lá déag de mí Bealtaine, scríobh Stephen J. Turnbull:
Aidan Kehoe writes:
> GNU Emacs’ coding sniffing is better than ours; for example, it
> responds sensibly to this at the start of a file:
>
> #!/usr/bin/env perl
> # -*- coding: windows-1251 -*-
Please, no.
Hmm? That’s how Python does it, and AIUI you had some part in their choice
of that deisgn. We need to respond sensibly to that at the start of a
file. We don’t currently.
IMHO, if this must be done, do a design from scratch, and think about
how
to recover from an incorrect cookie (eg, because somebody copied
boilerplate from one mostly-ASCII file to another, perhaps in an editor
that doesn't respect cookies).
That’s distinct from sniffing using coding cookies, and there’s no general
solution to it; windows-1251 cannot be reliably distinguished from
ISO-8859-1, or even from UTF-8. (The opposite direction _is_ possible for
UTF-8, though.)
*Then* look at GNU's implementation and see if it makes sense in
the
light of a sensible design.
Anyway, IIRC, you already committed a half-baked patch from Ivan
Golubev to do this.
No, that wasn’t me.
> and if I understand things correctly it also sniffs XML coding
> correctly.
This is very useful, and I too would like to see it; it's been on my
list for a while.
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta