diff options
| -rw-r--r-- | src/syntax.c | 10 |
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 (); | |||
| 1187 | DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, | 1187 | DEFUN ("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\ |
| 1189 | STRING is like the inside of a `[...]' in a regular expression\n\ | 1189 | STRING is like the inside of a `[...]' in a regular expression\n\ |
| 1190 | except that `]' is never special and `\\' quotes `^', `-' or `\\'.\n\ | 1190 | except that `]' is never special and `\\' quotes `^', `-' or `\\'\n\ |
| 1191 | (but not as the end of a range; quoting is never needed there).\n\ | ||
| 1191 | Thus, with arg \"a-zA-Z\", this skips letters stopping before first nonletter.\n\ | 1192 | Thus, with arg \"a-zA-Z\", this skips letters stopping before first nonletter.\n\ |
| 1192 | With arg \"^a-zA-Z\", skips nonletters stopping before first letter.\n\ | 1193 | With arg \"^a-zA-Z\", skips nonletters stopping before first letter.\n\ |
| 1193 | Returns the distance traveled, either zero or positive.") | 1194 | Returns 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 | { |