aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-14 19:04:01 +0000
committerRichard M. Stallman1998-06-14 19:04:01 +0000
commit1674d9a28b1e4ea7ca6b39ac1e5d74f9ccb15302 (patch)
tree46381e3ba00246915fed0b7c034cf9bf045bdfdf /src/syntax.c
parentcdfac812762e9247e957408625b41332dfcdad30 (diff)
downloademacs-1674d9a28b1e4ea7ca6b39ac1e5d74f9ccb15302.tar.gz
emacs-1674d9a28b1e4ea7ca6b39ac1e5d74f9ccb15302.zip
(skip_chars): Don't examine STRING before verifying that it is a string.
(scan_lists): Use prev_char_comend_first, not ...comstart...
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 79e278a5093..4ab87a3a3c2 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1289,11 +1289,13 @@ skip_chars (forwardp, syntaxp, string, lim)
1289 int negate = 0; 1289 int negate = 0;
1290 register int i, i_byte; 1290 register int i, i_byte;
1291 int multibyte = !NILP (current_buffer->enable_multibyte_characters); 1291 int multibyte = !NILP (current_buffer->enable_multibyte_characters);
1292 int string_multibyte = STRING_MULTIBYTE (string); 1292 int string_multibyte;
1293 int size_byte = STRING_BYTES (XSTRING (string)); 1293 int size_byte;
1294 1294
1295 CHECK_STRING (string, 0); 1295 CHECK_STRING (string, 0);
1296 char_ranges = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2); 1296 char_ranges = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2);
1297 string_multibyte = STRING_MULTIBYTE (string);
1298 size_byte = STRING_BYTES (XSTRING (string));
1297 1299
1298 if (NILP (lim)) 1300 if (NILP (lim))
1299 XSETINT (lim, forwardp ? ZV : BEGV); 1301 XSETINT (lim, forwardp ? ZV : BEGV);
@@ -2021,7 +2023,7 @@ scan_lists (from, count, depth, sexpflag)
2021 if (code == Sendcomment) 2023 if (code == Sendcomment)
2022 comstyle = SYNTAX_COMMENT_STYLE (c); 2024 comstyle = SYNTAX_COMMENT_STYLE (c);
2023 if (from > stop && SYNTAX_COMEND_SECOND (c) 2025 if (from > stop && SYNTAX_COMEND_SECOND (c)
2024 && prev_char_comstart_first (from, from_byte) 2026 && prev_char_comend_first (from, from_byte)
2025 && parse_sexp_ignore_comments) 2027 && parse_sexp_ignore_comments)
2026 { 2028 {
2027 /* We must record the comment style encountered so that 2029 /* We must record the comment style encountered so that