]> code.delx.au - gnu-emacs/blobdiff - src/syntax.c
(indent-for-tab-command): Indent the region if
[gnu-emacs] / src / syntax.c
index a9e6dda81fe930a031be97636507092765c8f842..4afaeda82dbb3058bc1a55228a1f69c0695d6bf5 100644 (file)
@@ -7,7 +7,7 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -1276,19 +1276,19 @@ scan_words (from, count)
          position of it.  */
       while (1)
        {
-         int temp_byte;
-
          if (from == beg)
            break;
-         temp_byte = dec_bytepos (from_byte);
+         DEC_BOTH (from, from_byte);
          UPDATE_SYNTAX_TABLE_BACKWARD (from);
-         ch0 = FETCH_CHAR (temp_byte);
+         ch0 = FETCH_CHAR (from_byte);
          code = SYNTAX (ch0);
          if (!(words_include_escapes
                && (code == Sescape || code == Scharquote)))
            if (code != Sword || WORD_BOUNDARY_P (ch0, ch1))
-             break;
-         DEC_BOTH (from, from_byte);
+             {
+               INC_BOTH (from, from_byte);
+               break;
+             }
          ch1 = ch0;
        }
       count++;
@@ -1669,10 +1669,10 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
                      p = GPT_ADDR;
                      stop = endp;
                    }
+                 UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
                  if (! fastmap[(int) SYNTAX (p[-1])])
                    break;
                  p--, pos--;
-                 UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
                }
          }
       }