From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: insert-char as alias to ucs-insert Date: Mon, 16 Jul 2012 12:31:04 +0200 Message-ID: <87k3y4atg7.fsf@zigzag.favinet> References: <87629qz67l.fsf@gnu.org> <87mx30t6aj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1342434691 7692 80.91.229.3 (16 Jul 2012 10:31:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2012 10:31:31 +0000 (UTC) Cc: emacs-devel@gnu.org, Leo , Rene@Kyllingstad.com To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 12:31:30 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SqiaP-0002VC-SQ for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2012 12:31:29 +0200 Original-Received: from localhost ([::1]:50214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqiaO-0008Vv-Ud for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2012 06:31:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqiaH-0008Vl-9h for emacs-devel@gnu.org; Mon, 16 Jul 2012 06:31:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqiaG-0007tW-4H for emacs-devel@gnu.org; Mon, 16 Jul 2012 06:31:21 -0400 Original-Received: from smtp206.alice.it ([82.57.200.102]:47207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqiaE-0007qF-4g; Mon, 16 Jul 2012 06:31:18 -0400 Original-Received: from zigzag.favinet (82.58.5.145) by smtp206.alice.it (8.6.023.02) id 4FFCD56E00E14EEC; Mon, 16 Jul 2012 12:30:59 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1Sqia1-0000Wu-Gk; Mon, 16 Jul 2012 12:31:05 +0200 In-Reply-To: <87mx30t6aj.fsf@gnu.org> (Chong Yidong's message of "Mon, 16 Jul 2012 17:16:20 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.102 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151660 Archived-At: () Chong Yidong () 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 =E2=80=98ucs-insert=E2=80=99 throw= ing 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., =E2=80=98ucs-insert=E2=80=99 = w/ specified range) into a separate func and have both =E2=80=98ucs-insert=E2= =80=99 and =E2=80=98insert-char=E2=80=99 call that, specifying their expected rang= e. Otherwise, we would need to document =E2=80=98ucs-insert=E2=80=99 as not ac= tually respecting "UCS" range, i.e., a misnomer. Somewhat suboptimal...