From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Chong Yidong <cyd@gnu.org>
Cc: emacs-devel@gnu.org, Leo <sdl.web@gmail.com>, Rene@Kyllingstad.com
Subject: Re: insert-char as alias to ucs-insert
Date: Mon, 16 Jul 2012 12:31:04 +0200 [thread overview]
Message-ID: <87k3y4atg7.fsf@zigzag.favinet> (raw)
In-Reply-To: <87mx30t6aj.fsf@gnu.org> (Chong Yidong's message of "Mon, 16 Jul 2012 17:16:20 +0800")
() Chong Yidong <cyd@gnu.org>
() 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...
next prev parent reply other threads:[~2012-07-16 10:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 14:00 insert-char as alias to ucs-insert René Kyllingstad
2012-07-14 2:07 ` Leo
2012-07-14 15:57 ` Chong Yidong
2012-07-15 16:35 ` René Kyllingstad
2012-07-16 9:16 ` Chong Yidong
2012-07-16 10:31 ` Thien-Thi Nguyen [this message]
2012-07-16 15:58 ` Eli Zaretskii
2012-07-16 19:13 ` Thien-Thi Nguyen
2012-07-17 13:11 ` Jason Rumney
2012-07-16 16:14 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k3y4atg7.fsf@zigzag.favinet \
--to=ttn@gnuvola.org \
--cc=Rene@Kyllingstad.com \
--cc=cyd@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).