>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)iskon.hr> writes:
Hrvoje> [ I've added Ben to Cc because he AFAIR doesn't read xemacs-beta.
]
Oops! Thank you. I just forwarded my message to him.
Hrvoje> "Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
> Can somebody give a bunch of examples where using integers as
> characters is useful?
Hrvoje> I can. Here are four:
Hrvoje> [iterating over letters]
OK, I can imagine that being common in legacy code.
Hrvoje> (defun turn-a-into-b ()
Yuck. But I can see people doing that.
Hrvoje> (defvar foo-legal-chars (mapcar #'int-char
Hrvoje> (defun stupid ()
Explicit calls to int-char can always be translated to make-char,
which will be Mule-safe. Note that given your proposal that int-char
return Latin-1 characters in \xA1--\xFE, (stupid) will give different
behavior in `xemacs-nomule -font *-iso8859-2' and `xemacs-mule'.
Hrvoje> I could think of more of such, but I don't really see the
Hrvoje> point.
The point is that at least two of your four examples are bugs.
(`foo-legal-chars' suffers from the same problem as `stupid'.) And
the implicit ones, if they turn out to be bugs after all (eg, because
the internal representation of characters changes) are going to be
practically impossible to find until they bite.
Hrvoje> The ones without them are even worse because they are
Hrvoje> implicit. See my examples.
Sigh. So really the only way to find them is to make a private XEmacs
without the implicit conversion and see where it barfs.
Hrvoje> Some of us don't do input methods. But that's beside the
Hrvoje> point, because C-q can as well use make-char or whatever.
Sorry, I've been living in I18N too long. What I mean by an "input
method" is normally called a "keymap". :-) Ie, the user's input
interface.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
__________________________________________________________________________
__________________________________________________________________________
What are those two straight lines for? "Free software rules."