aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-10-11 21:58:43 -0700
committerPaul Eggert2011-10-11 21:58:43 -0700
commit0324f3af3dddd189617a9cc4b203e3783e96fc7a (patch)
treef4f8512bdb6a8e5566e82bf8049f738594986216 /src
parent7359a765382ff00442f08d1435fd5ededbe10283 (diff)
downloademacs-0324f3af3dddd189617a9cc4b203e3783e96fc7a.tar.gz
emacs-0324f3af3dddd189617a9cc4b203e3783e96fc7a.zip
* lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
Some packages use them to denote characters with modifiers.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/lread.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c24e70523f5..8ad59d5eb27 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-10-12 Paul Eggert <eggert@cs.ucla.edu>
2
3 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
4 Some packages use them to denote characters with modifiers.
5
12011-10-11 Andreas Schwab <schwab@linux-m68k.org> 62011-10-11 Andreas Schwab <schwab@linux-m68k.org>
2 7
3 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR) 8 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
diff --git a/src/lread.c b/src/lread.c
index af737d27070..110f3e62f71 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2210,7 +2210,7 @@ read_escape (Lisp_Object readcharfun, int stringp)
2210 case 'x': 2210 case 'x':
2211 /* A hex escape, as in ANSI C. */ 2211 /* A hex escape, as in ANSI C. */
2212 { 2212 {
2213 int i = 0; 2213 unsigned int i = 0;
2214 int count = 0; 2214 int count = 0;
2215 while (1) 2215 while (1)
2216 { 2216 {
@@ -2234,7 +2234,9 @@ read_escape (Lisp_Object readcharfun, int stringp)
2234 UNREAD (c); 2234 UNREAD (c);
2235 break; 2235 break;
2236 } 2236 }
2237 if (MAX_CHAR < i) 2237 /* Allow hex escapes as large as ?\xfffffff, because some
2238 packages use them to denote characters with modifiers. */
2239 if ((CHAR_META | (CHAR_META - 1)) < i)
2238 error ("Hex character out of range: \\x%x...", i); 2240 error ("Hex character out of range: \\x%x...", i);
2239 count += count < 3; 2241 count += count < 3;
2240 } 2242 }