diff options
author | Kenichi Handa <handa@m17n.org> | 2003-04-09 07:12:51 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2003-04-09 07:12:51 +0000 |
commit | e613ea97b60a95fc13a3a883e672140717274432 (patch) | |
tree | 416887e06ceaaa5dbd17f4ab56b6efec5c2321b2 /src/lread.c | |
parent | cb98871c49f706ec0a2ac9e290d5b7750112021b (diff) | |
download | emacs-e613ea97b60a95fc13a3a883e672140717274432.tar.gz |
(read1): Before calling index, check if the 2nd
arguemnt is in ASCII range.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/lread.c b/src/lread.c index e4663e0eb89..73345d30001 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2278,16 +2278,18 @@ read1 (readcharfun, pch, first_in_list) UNREAD (next_next_char); ok = (next_next_char <= 040 - || index ("\"';([#?", next_next_char) - || (!first_in_list && next_next_char == '`') - || (new_backquote_flag && next_next_char == ',')); + || (next_next_char < 0200 + && (index ("\"';([#?", next_next_char) + || (!first_in_list && next_next_char == '`') + || (new_backquote_flag && next_next_char == ',')))); } else { ok = (next_char <= 040 - || index ("\"';()[]#?", next_char) - || (!first_in_list && next_char == '`') - || (new_backquote_flag && next_char == ',')); + || (next_char < 0200 + && (index ("\"';()[]#?", next_char) + || (!first_in_list && next_char == '`') + || (new_backquote_flag && next_char == ',')))); } UNREAD (next_char); if (!ok) @@ -2445,9 +2447,10 @@ read1 (readcharfun, pch, first_in_list) UNREAD (next_char); if (next_char <= 040 - || index ("\"';([#?", next_char) - || (!first_in_list && next_char == '`') - || (new_backquote_flag && next_char == ',')) + || (next_char < 0200 + && index ("\"';([#?", next_char) + || (!first_in_list && next_char == '`') + || (new_backquote_flag && next_char == ','))) { *pch = c; return Qnil; @@ -2468,9 +2471,10 @@ read1 (readcharfun, pch, first_in_list) char *end = read_buffer + read_buffer_size; while (c > 040 - && !index ("\"';()[]#", c) - && !(!first_in_list && c == '`') - && !(new_backquote_flag && c == ',')) + && (c >= 0200 + || (!index ("\"';()[]#", c) + && !(!first_in_list && c == '`') + && !(new_backquote_flag && c == ',')))) { if (end - p < MAX_MULTIBYTE_LENGTH) { |