From: Stefan Monnier Date: Tue, 12 Nov 2002 20:41:14 +0000 (+0000) Subject: (scan_sexps_forward): Undo last patch. X-Git-Tag: ttn-vms-21-2-B4~12502 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3ceb4629cfc85bb7210786d7bb66b85f6a92acfd;p=emacs.git (scan_sexps_forward): Undo last patch. Use a more obvious fix: check eob before updating the syntax table. --- diff --git a/src/ChangeLog b/src/ChangeLog index efe2355cfa5..d976687ad40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-11-12 Stefan Monnier + + * syntax.c (scan_sexps_forward): Undo last patch. + Use a more obvious fix: check eob before updating the syntax table. + 2002-11-09 Stefan Monnier * syntax.c (scan_sexps_forward): Update syntax table before reading diff --git a/src/syntax.c b/src/syntax.c index eb0b96b9b01..5114fc06af7 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -2504,10 +2504,11 @@ scan_sexps_forward (stateptr, from, from_byte, end, targetdepth, #define INC_FROM \ do { prev_from = from; \ prev_from_byte = from_byte; \ - UPDATE_SYNTAX_TABLE_FORWARD (prev_from); \ prev_from_syntax \ = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); \ INC_BOTH (from, from_byte); \ + if (from < end) \ + UPDATE_SYNTAX_TABLE_FORWARD (from); \ } while (0) immediate_quit = 1; @@ -2580,6 +2581,7 @@ do { prev_from = from; \ SETUP_SYNTAX_TABLE (prev_from, 1); prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); + UPDATE_SYNTAX_TABLE_FORWARD (from); /* Enter the loop at a place appropriate for initial state. */ @@ -2620,7 +2622,6 @@ do { prev_from = from; \ else if (from < end) if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)) if (c1 = FETCH_CHAR (from_byte), - UPDATE_SYNTAX_TABLE_FORWARD (from_byte), SYNTAX_COMSTART_SECOND (c1)) /* Duplicate code to avoid a complex if-expression which causes trouble for the SGI compiler. */