# HG changeset patch # User Karl Heuer # Date 888109475 0 # Node ID 25bb3da85d05393692871f4b8afb9005c3af686f # Parent 15d1b7bf1cd734a327b0142fe50adcff1e43d504 (UPDATE_SYNTAX_TABLE_FORWARD): Fix condition. (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE): Likewise. (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix bounds. diff -r 15d1b7bf1cd7 -r 25bb3da85d05 src/syntax.h --- a/src/syntax.h Sun Feb 22 01:04:11 1998 +0000 +++ b/src/syntax.h Sun Feb 22 01:04:35 1998 +0000 @@ -210,7 +210,7 @@ currently good for a position before POS. */ #define UPDATE_SYNTAX_TABLE_FORWARD(pos) \ - ((pos) >= gl_state.e_property - gl_state.offset \ + ((pos) >= gl_state.e_property \ ? (update_syntax_table ((pos) + gl_state.offset, 1, 0, \ gl_state.object), \ 1) \ @@ -220,7 +220,7 @@ currently good for a position after POS. */ #define UPDATE_SYNTAX_TABLE_BACKWARD(pos) \ - ((pos) <= gl_state.b_property - gl_state.offset \ + ((pos) <= gl_state.b_property \ ? (update_syntax_table ((pos) + gl_state.offset, -1, 0, \ gl_state.object), \ 1) \ @@ -229,11 +229,11 @@ /* Make syntax table good for POS. */ #define UPDATE_SYNTAX_TABLE(pos) \ - ((pos) <= gl_state.b_property - gl_state.offset \ + ((pos) <= gl_state.b_property \ ? (update_syntax_table ((pos) + gl_state.offset, -1, 0, \ gl_state.object), \ 1) \ - : ((pos) >= gl_state.e_property - gl_state.offset \ + : ((pos) >= gl_state.e_property \ ? (update_syntax_table ((pos) + gl_state.offset, 1, 0, \ gl_state.object), \ 1) \ @@ -272,14 +272,14 @@ if (BUFFERP (gl_state.object)) \ { \ struct buffer *buf = XBUFFER (gl_state.object); \ - gl_state.b_property = BUF_BEGV (buf) - 1; \ - gl_state.e_property = BUF_ZV (buf); \ + gl_state.b_property = 0; \ + gl_state.e_property = BUF_ZV (buf) - BUF_BEGV (buf) + 1; \ gl_state.offset = BUF_BEGV (buf) - 1; \ } \ else if (NILP (gl_state.object)) \ { \ - gl_state.b_property = BEGV - 1; \ - gl_state.e_property = ZV; \ + gl_state.b_property = 0; \ + gl_state.e_property = ZV - BEGV + 1; \ gl_state.offset = BEGV - 1; \ } \ else if (EQ (gl_state.object, Qt)) \