Either int-char should be the mirror opposite of char-int (i.e. accept all
legal char integers), or it should be removed entirely.
int-char should *never* have any dependence on the language environment.
I don't think C-q should either. If Hrvoje wants to insert Latin-2
characters by number, then make C-u C-q work so that it also prompts for a
character set, with a default chosen from the language environment.
ben
Yoshiki Hayashi wrote:
Hrvoje Niksic <hniksic(a)iskon.hr> writes:
> As Ben said, now that we've fixed the actual bugs, we can think about
> changing the behaviour for int-char conversions for 21.2.
Following are proposed which integers should be accepted
where characters are expected:
1) Don't allow anything
2) Accept 0-127
3) Accept 0-256
4) Accept everything
Other things proposed are:
a) When doing C-q, treat 128-256 as Latin-2 in Latin 2
language environment.
So far, most of the proposal is intended to apply to every
int-char conversions, I'd like to make some functions to
accept.
My plan is:
Accept only 0-256 in every place except int-to-char.
int-to-char accepts every valid integers.
Make new function which does int-to-char conversion
correctly according to the language environment.
This way, most of the code which does (insert (1+ ?a)) or
something continues working. Now internal representation is
changed a little bit, so disabling > 256 characters will
warn those who are dealing with internal representation
directly, which is bad. Still, you can do
(let ((i 1442))
(while (i < 2000)
(insert (int-to-char i))
(setq i (+1 i))))
to achieve old behaviour.
For C-q, I'm not for changing it's original definition,
since it might confuse people who are expecting Latin-1 in
other language environment and typing just 1 integer doesn't
make sense for multibyte world. It's cleaner to make new
function, which does make-char according to the charset of
language-info-alist so that people who use that often can
bind it to C-q or some other keys.
--
Yoshiki Hayashi
--
ben
--
In order to save my hands, I am cutting back on my responses, especially to
XEmacs-related mail. You
_will_ get a response, but please be patient. If you need an immediate
response and itÂ’s not apparent in
your message, please say so. Thanks for your understanding.