aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-13 06:47:15 +0000
committerRichard M. Stallman1998-05-13 06:47:15 +0000
commit74cf0beb862b3ffc6478c8ff409b138e788af561 (patch)
treee685707f7f36c2d5cbe4aa214168b6665b55b0b8 /src/syntax.c
parent271af23306a07108a45b833cfd96598bc736f621 (diff)
downloademacs-74cf0beb862b3ffc6478c8ff409b138e788af561.tar.gz
emacs-74cf0beb862b3ffc6478c8ff409b138e788af561.zip
(skip_chars): When fetching char after \,
don't fail to set c_leading_code.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 5d67d11850c..62cc124a318 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1187,7 +1187,8 @@ Lisp_Object skip_chars ();
1187DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, 1187DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0,
1188 "Move point forward, stopping before a char not in STRING, or at pos LIM.\n\ 1188 "Move point forward, stopping before a char not in STRING, or at pos LIM.\n\
1189STRING is like the inside of a `[...]' in a regular expression\n\ 1189STRING is like the inside of a `[...]' in a regular expression\n\
1190except that `]' is never special and `\\' quotes `^', `-' or `\\'.\n\ 1190except that `]' is never special and `\\' quotes `^', `-' or `\\'\n\
1191 (but not as the end of a range; quoting is never needed there).\n\
1191Thus, with arg \"a-zA-Z\", this skips letters stopping before first nonletter.\n\ 1192Thus, with arg \"a-zA-Z\", this skips letters stopping before first nonletter.\n\
1192With arg \"^a-zA-Z\", skips nonletters stopping before first letter.\n\ 1193With arg \"^a-zA-Z\", skips nonletters stopping before first letter.\n\
1193Returns the distance traveled, either zero or positive.") 1194Returns the distance traveled, either zero or positive.")
@@ -1311,9 +1312,12 @@ skip_chars (forwardp, syntaxp, string, lim)
1311 break; 1312 break;
1312 1313
1313 if (string_multibyte) 1314 if (string_multibyte)
1314 FETCH_STRING_CHAR_ADVANCE (c, string, i, i_byte); 1315 {
1316 c_leading_code = XSTRING (string)->data[i];
1317 FETCH_STRING_CHAR_ADVANCE (c, string, i, i_byte);
1318 }
1315 else 1319 else
1316 c = XSTRING (string)->data[i++]; 1320 c = c_leading_code = XSTRING (string)->data[i++];
1317 } 1321 }
1318 if (i < XSTRING (string)->size && XSTRING (string)->data[i] == '-') 1322 if (i < XSTRING (string)->size && XSTRING (string)->data[i] == '-')
1319 { 1323 {