emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Unicode Lisp reader escapes.


From: Aidan Kehoe
Subject: Re: [PATCH] Unicode Lisp reader escapes.
Date: Fri, 23 Jun 2006 20:35:00 +0200

 Ar an fichiú lá de mí Meitheamh, scríobh Kenichi Handa: 

 > 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’s a patch to implement that behaviour. 

src/ChangeLog addition:

2006-06-23  Aidan Kehoe  <address@hidden>

        * 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.
        

GNU Emacs Trunk source patch:
Diff command:   cvs -q diff -u
Files affected: src/lread.c

Index: src/lread.c
===================================================================
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;
 
-       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);
       }
 
     default:


-- 
Santa Maradona, priez pour moi!




reply via email to

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