changeset 22052:74d69da256e4

(skip_chars): When fetching char after \, don't fail to set c_leading_code.
author Richard M. Stallman <rms@gnu.org>
date Wed, 13 May 1998 06:47:15 +0000
parents 3e5822a3448d
children 8697087ea026
files src/syntax.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Wed May 13 05:23:56 1998 +0000
+++ b/src/syntax.c	Wed May 13 06:47:15 1998 +0000
@@ -1187,7 +1187,8 @@
 DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0,
   "Move point forward, stopping before a char not in STRING, or at pos LIM.\n\
 STRING is like the inside of a `[...]' in a regular expression\n\
-except that `]' is never special and `\\' quotes `^', `-' or `\\'.\n\
+except that `]' is never special and `\\' quotes `^', `-' or `\\'\n\
+ (but not as the end of a range; quoting is never needed there).\n\
 Thus, with arg \"a-zA-Z\", this skips letters stopping before first nonletter.\n\
 With arg \"^a-zA-Z\", skips nonletters stopping before first letter.\n\
 Returns the distance traveled, either zero or positive.")
@@ -1311,9 +1312,12 @@
 		break;
 
 	      if (string_multibyte)
-		FETCH_STRING_CHAR_ADVANCE (c, string, i, i_byte);
+		{
+		  c_leading_code = XSTRING (string)->data[i];
+		  FETCH_STRING_CHAR_ADVANCE (c, string, i, i_byte);
+		}
 	      else
-		c = XSTRING (string)->data[i++];
+		c = c_leading_code = XSTRING (string)->data[i++];
 	    }
 	  if (i < XSTRING (string)->size && XSTRING (string)->data[i] == '-')
 	    {