Hrvoje Niksic wrote:
"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp>
writes:
> >>>>> "Hrvoje" == Hrvoje Niksic <hniksic(a)srce.hr>
writes:
>
> Hrvoje> But who cares about that? You're not supposed to be
> Hrvoje> relying on the value char-int returns, right? Right. The
> >> Well, yes, but in practice people do rely on that value;
>
> Hrvoje> Who, and what for?
>
> The byte-compiler uses it in couple of places, subr.el uses it I
> think, w3.el uses it a lot. (I'm upgrading the system where my
> notes are, I can't say more off hand.)
You haven't answered the "what for" part, which was the more important
bit. That the byte-compiler uses it is of no consequence because it
is an integral part of the system and can be fixed by us. As for
subr.el, the only mention of char-int I can find is:
(define-function 'char-int 'char-to-int)
Ditto for char-to-int.
I haven't looked at w3 sources.
Emacs/W3 uses it in the SOCKS code, where the stuff _really_ is just an int
from the wire protocol, so that is safe.
It also uses it to make 'dingbats' characters, and only ever uses that on
things like ?j ?i, etc, which are safe. If (make-char ...) can take
something other than an int, let me know and this usage can disappear.
It is used in w3-parse.el if you see an invalid SGML character, to look up
things in the stupid #%!@!ing microsoft code pages for replacement. I
believe I started using char-int here because of you Stephen - at least I
think it was you that pointed out that it spewed tons of Ebola warnings on
incorrectly marked japanese documents when we were in tokyo.
All of these could fairly easily be removed, except for the SOCKS code.
-Bill P.