[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: insert-char as alias to ucs-insert

From: Thien-Thi Nguyen
Subject: Re: insert-char as alias to ucs-insert
Date: Mon, 16 Jul 2012 12:31:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

() Chong Yidong <address@hidden>
() Mon, 16 Jul 2012 17:16:20 +0800

   One significant difference is that ucs-insert errors out if the
   argument is larger than #x10FFFF, whereas insert-char does
   not---it tests for CHARACTERP, which accepts up to #x3FFFFF.
   That's because the code space of utf-8-emacs is larger than
   Unicode.  Off the top of my head, making it more permissive is
   OK, i.e. we should allow insert-char with arguments of up to
   #x3FFFFF.  Anyone have a different opinion?

So this would break code that depends on ‘ucs-insert’ throwing
this range error.  Is there a lot of code like that in the wild?
Regardless, it feels wrong to discard this check.  Better IMHO
would be to factor out the common bits (i.e., ‘ucs-insert’ w/
specified range) into a separate func and have both ‘ucs-insert’
and ‘insert-char’ call that, specifying their expected range.

Otherwise, we would need to document ‘ucs-insert’ as not actually
respecting "UCS" range, i.e., a misnomer.  Somewhat suboptimal...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]