]> git.eshelyaron.com Git - emacs.git/commitdiff
(skip_chars): Fix previous change in syntax/backward case.
authorRichard M. Stallman <rms@gnu.org>
Mon, 28 Apr 1997 00:49:41 +0000 (00:49 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 28 Apr 1997 00:49:41 +0000 (00:49 +0000)
src/syntax.c

index 9ead7e64346dcdf6dc6d73d02b931f99cf0ad240..f396b24e087f003e8e9e486a2c75fe20339443b8 100644 (file)
@@ -1285,21 +1285,25 @@ skip_chars (forwardp, syntaxp, string, lim)
                  {
                    int savepos = pos;
                    DEC_POS (pos);
+                   UPDATE_SYNTAX_TABLE_BACKWARD (pos);
                    if (!fastmap[(int) SYNTAX (FETCH_CHAR (pos))])
                      {
                        pos = savepos;
                        break;
                      }
-                   UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
                  }
              }
            else
              {
-               while (pos > XINT (lim)
-                      && fastmap[(int) SYNTAX (FETCH_BYTE (pos - 1))])
+               while (pos > XINT (lim))
                  {
                    pos--;
-                   UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
+                   UPDATE_SYNTAX_TABLE_BACKWARD (pos);
+                   if (!fastmap[(int) SYNTAX (FETCH_BYTE (pos))])
+                     {
+                       pos++;
+                       break;
+                     }
                  }
              }
          }