>>>> "Ben" == Ben Wing <ben(a)666.com>
writes:
Ben> When I wrote all this code, I made a conscious decision, for
Ben> compatibility reasons, to allow integers wherever characters
Ben> are allowed. If we're going to change this, (a) we should
Ben> think carefully about what this means,
I don't have a problem with allowing people to use `255' as an
abbreviation for `?\377', as long as they don't care if we define the
default interpretation for bytes in GR to be Latin-2. A move which is
long overdue IMHO. ;-)
But I can't see a good reason why "characters" with "code points"
bigger than 255 should be permitted to be represented by integers as
long as `int-char' doesn't take a character set argument. I'm tempted
to restrict that to ASCII + C1 controls, even.
It doesn't necessarily make sense. Japanese, for example, should
properly have its code points defined by ku-ten, a pair of integers in
the range 1-94; I don't even know that it really makes sense to talk
of an integer representation for Japanese characters outside of
Unicode.
What did you have in mind as the semantics for say `(int-char 161)'?
Or '(int-char 8000)' for that matter?
The bug you're seeing looks to actually be a bug in CHAR_INTP(), which is
supposed to recognize valid character integers. Therefore, you should fix
this macro.
ben
Yoshiki Hayashi wrote:
"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp>
writes:
> >>>>> "Kyle" == Kyle Jones
<kyle_jones(a)wonderworks.com> writes:
>
> Kyle> (insert 8000) seems fundamentally broken to me. [...]
>
> Kyle> I think Finsert ought to be made to signal
> Kyle> wrong-type-argument when handed an integer.
>
> Agree.
>
> In Mule characters must be opaque objects---currently they have
> internal structure, and internal representation is under consideration
> for revision. FSFmacs has the appropriate character-creation
> functions because it uses the same representation; code that doesn't
> use them is broken in both variants.
OK. Here is the patch. With this patch, Finsert will be OK,
but you can still make XEmacs crash with (int-to-char 8000).
I'll write fix for that later.
When this patch is applied, w3 must be fixed since it uses
(insert INT) to insert Ϩ or something like that.
1999-11-09 Yoshiki Hayashi <t90553(a)mail.ecc.u-tokyo.ac.jp>
* editfns.c (buffer_insert_1): Don't treat an integer as
a character.
------------------------------------------------------------------------
Name: editfns.c.diff
editfns.c.diff Type: Plain Text (text/plain)
Encoding: 7bit
------------------------------------------------------------------------
--
Yoshiki Hayashi
--
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."