Mercurial > emacs
changeset 50513:b83d48b25b9b
(read1): Before calling index, check if the 2nd
arguemnt is in ASCII range.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 09 Apr 2003 07:12:51 +0000 |
parents | 8d5fd224ff27 |
children | 1a72ba81bfa0 |
files | src/lread.c |
diffstat | 1 files changed, 16 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lread.c Wed Apr 09 07:12:32 2003 +0000 +++ b/src/lread.c Wed Apr 09 07:12:51 2003 +0000 @@ -2278,16 +2278,18 @@ 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 @@ 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 @@ 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) {