changeset 77757:cbb18b4e981b

(skip_chars): Update syntax-table only after we checked that the new location is valid.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 19 May 2007 15:15:19 +0000
parents 7d0f49cdc5da
children 6d47c44cdbaa
files src/ChangeLog src/syntax.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat May 19 14:00:15 2007 +0000
+++ b/src/ChangeLog	Sat May 19 15:15:19 2007 +0000
@@ -1,3 +1,8 @@
+2007-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* syntax.c (skip_chars): Update syntax-table only after we checked that
+	the new location is valid.
+
 2007-05-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* macterm.c (x_calc_absolute_position): Add BLOCK_INPUT around
--- a/src/syntax.c	Sat May 19 14:00:15 2007 +0000
+++ b/src/syntax.c	Sat May 19 15:15:19 2007 +0000
@@ -1669,10 +1669,10 @@
 		      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);
 		}
 	  }
       }