From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aidan Kehoe Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: [PATCH] Unicode Lisp reader escapes. Date: Fri, 23 Jun 2006 20:35:00 +0200 Message-ID: <17564.13396.391261.701485@parhasard.net> References: <17491.34779.959316.484740@parhasard.net> <17492.29148.246942.842300@parhasard.net> <8764kkawsf.fsf@jurta.org> <87vesi6nh1.fsf@jurta.org> <878xp8g2a9.fsf@jurta.org> <17537.54719.354843.89030@parhasard.net> <17553.43278.718379.863167@parhasard.net> <17557.31514.794081.590563@parhasard.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1151087545 2164 80.91.229.2 (23 Jun 2006 18:32:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jun 2006 18:32:25 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 23 20:32:15 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FtqRn-0006Bb-0V for ged-emacs-devel@m.gmane.org; Fri, 23 Jun 2006 20:32:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FtqRm-0000T3-GY for ged-emacs-devel@m.gmane.org; Fri, 23 Jun 2006 14:32:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FtqRa-0000Sf-79 for emacs-devel@gnu.org; Fri, 23 Jun 2006 14:31:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FtqRY-0000Qp-Dq for emacs-devel@gnu.org; Fri, 23 Jun 2006 14:31:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FtqRY-0000Qa-9W; Fri, 23 Jun 2006 14:31:48 -0400 Original-Received: from [66.111.49.30] (helo=icarus.asclepian.ie) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Ftqcn-0000Rp-64; Fri, 23 Jun 2006 14:43:25 -0400 Original-Received: by icarus.asclepian.ie (Postfix, from userid 1003) id A34048008C; Fri, 23 Jun 2006 19:31:45 +0100 (IST) Original-To: Kenichi Handa In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta26) "endive" (+CVS-20060512) XEmacs Lucid X-NS5-file-as-sent: t X-Echelon-distraction: quiche radar Ron Brown Peking smuggle Cocaine X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56130 gmane.emacs.pretest.bugs:12615 Archived-At: Ar an fichi=C3=BA l=C3=A1 de m=C3=AD Meitheamh, scr=C3=ADobh Kenichi Han= da:=20 > But, as we can't do that in read_escape, I propose to simply > signal an error as unsupported character. I think anything > else leads to unexpected behavior. Okay, here=E2=80=99s a patch to implement that behaviour.=20 src/ChangeLog addition: 2006-06-23 Aidan Kehoe * lread.c (read_escape): Instead of creating a place-holder character when an unknown Unicode code point is encountered as a string or character escape, signal an error. =09 GNU Emacs Trunk source patch: Diff command: cvs -q diff -u Files affected: src/lread.c Index: src/lread.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/lread.c,v retrieving revision 1.353 diff -u -u -r1.353 lread.c --- src/lread.c 9 Jun 2006 18:22:30 -0000 1.353 +++ src/lread.c 23 Jun 2006 18:24:28 -0000 @@ -1964,17 +1964,12 @@ make_number(i)); UNGCPRO; =20 - if (EQ(Qnil, lisp_char)) + if (NILP(lisp_char)) { - /* This is ugly and horrible and trashes the user's data. */ - XSETFASTINT (i, MAKE_CHAR (charset_katakana_jisx0201, - 34 + 128, 46 + 128)); - return i; - } - else - { - return XFASTINT (lisp_char); + error ("No support for Unicode code point U+%x", i); } + + return XFASTINT (lisp_char); } =20 default: --=20 Santa Maradona, priez pour moi!