aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1998-01-01 02:46:10 +0000
committerRichard M. Stallman1998-01-01 02:46:10 +0000
commit4bbd5bc3149ecf8e5d50d88a9730d07fdb32d776 (patch)
tree3c9a6d4cdb411d753da02f33c9b4a3bfa33666d8 /src
parent4c7b7eabfd2234db335dea8a045373322c07ce09 (diff)
downloademacs-4bbd5bc3149ecf8e5d50d88a9730d07fdb32d776.tar.gz
emacs-4bbd5bc3149ecf8e5d50d88a9730d07fdb32d776.zip
(SETUP_SYNTAX_TABLE_FOR_OBJECT): Call bytepos_to_charpos.
Wrap in if (1) ... else.
Diffstat (limited to 'src')
-rw-r--r--src/syntax.h52
1 files changed, 29 insertions, 23 deletions
diff --git a/src/syntax.h b/src/syntax.h
index 595ed80b4c4..da243e8cce5 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -239,31 +239,37 @@ extern char syntax_code_spec[16];
239 239
240 This is meant for regex.c to use. For buffers, regex.c passes arguments 240 This is meant for regex.c to use. For buffers, regex.c passes arguments
241 to the UPDATE_SYNTAX_TABLE macros which are relative to BEGV. 241 to the UPDATE_SYNTAX_TABLE macros which are relative to BEGV.
242 So if it is a buffer,a we set the offset field to BEGV. */ 242 So if it is a buffer, we set the offset field to BEGV. */
243 243
244#define SETUP_SYNTAX_TABLE_FOR_OBJECT(object, from, count) \ 244#define SETUP_SYNTAX_TABLE_FOR_OBJECT(object, from, count) \
245 if (BUFFERP (object) || NILP (object)) \ 245if (1) \
246 { \ 246 { \
247 gl_state.b_property = BEGV - 1; \ 247 if (BUFFERP (object) || NILP (object)) \
248 gl_state.e_property = ZV; \ 248 { \
249 gl_state.offset = BEGV - 1; \ 249 gl_state.b_property = BEGV - 1; \
250 } \ 250 gl_state.e_property = ZV; \
251 else if (EQ (object, Qt)) \ 251 gl_state.offset = BEGV - 1; \
252 { \ 252 } \
253 gl_state.b_property = - 1; \ 253 else if (EQ (object, Qt)) \
254 gl_state.e_property = 1500000000; \ 254 { \
255 gl_state.offset = 0; \ 255 gl_state.b_property = - 1; \
256 } \ 256 gl_state.e_property = 1500000000; \
257 else \ 257 gl_state.offset = 0; \
258 { \ 258 } \
259 gl_state.b_property = -1; \ 259 else \
260 gl_state.e_property = 1 + XSTRING (object)->size; \ 260 { \
261 gl_state.offset = 0; \ 261 gl_state.b_property = -1; \
262 } \ 262 gl_state.e_property = 1 + XSTRING (object)->size; \
263 gl_state.use_global = 0; \ 263 gl_state.offset = 0; \
264 gl_state.current_syntax_table = current_buffer->syntax_table; \ 264 } \
265 if (parse_sexp_lookup_properties) \ 265 gl_state.use_global = 0; \
266 update_syntax_table (count > 0 ? (from) : (from) - 1, count, 1, object); 266 gl_state.current_syntax_table = current_buffer->syntax_table; \
267 if (parse_sexp_lookup_properties) \
268 update_syntax_table ((bytepos_to_charpos (from) \
269 + (count > 0 ? 0 : -1)), \
270 count, 1, object); \
271 } \
272else
267 273
268struct gl_state_s 274struct gl_state_s
269{ 275{