diff options
Diffstat (limited to 'src/syntax.h')
| -rw-r--r-- | src/syntax.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/syntax.h b/src/syntax.h index bea66d1fada..42d689cb96c 100644 --- a/src/syntax.h +++ b/src/syntax.h | |||
| @@ -19,12 +19,11 @@ You should have received a copy of the GNU General Public License | |||
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | extern Lisp_Object Qsyntax_table_p; | 22 | extern void update_syntax_table (EMACS_INT, EMACS_INT, int, Lisp_Object); |
| 23 | extern void update_syntax_table (EMACS_INT, int, int, Lisp_Object); | ||
| 24 | 23 | ||
| 25 | /* The standard syntax table is stored where it will automatically | 24 | /* The standard syntax table is stored where it will automatically |
| 26 | be used in all new buffers. */ | 25 | be used in all new buffers. */ |
| 27 | #define Vstandard_syntax_table buffer_defaults.syntax_table | 26 | #define Vstandard_syntax_table BVAR (&buffer_defaults, syntax_table) |
| 28 | 27 | ||
| 29 | /* A syntax table is a chartable whose elements are cons cells | 28 | /* A syntax table is a chartable whose elements are cons cells |
| 30 | (CODE+FLAGS . MATCHING-CHAR). MATCHING-CHAR can be nil if the char | 29 | (CODE+FLAGS . MATCHING-CHAR). MATCHING-CHAR can be nil if the char |
| @@ -79,7 +78,7 @@ enum syntaxcode | |||
| 79 | # define CURRENT_SYNTAX_TABLE gl_state.current_syntax_table | 78 | # define CURRENT_SYNTAX_TABLE gl_state.current_syntax_table |
| 80 | #else | 79 | #else |
| 81 | # define SYNTAX_ENTRY SYNTAX_ENTRY_INT | 80 | # define SYNTAX_ENTRY SYNTAX_ENTRY_INT |
| 82 | # define CURRENT_SYNTAX_TABLE current_buffer->syntax_table | 81 | # define CURRENT_SYNTAX_TABLE BVAR (current_buffer, syntax_table) |
| 83 | #endif | 82 | #endif |
| 84 | 83 | ||
| 85 | #define SYNTAX_ENTRY_INT(c) CHAR_TABLE_REF (CURRENT_SYNTAX_TABLE, (c)) | 84 | #define SYNTAX_ENTRY_INT(c) CHAR_TABLE_REF (CURRENT_SYNTAX_TABLE, (c)) |
| @@ -204,7 +203,7 @@ extern char syntax_code_spec[16]; | |||
| 204 | do \ | 203 | do \ |
| 205 | { \ | 204 | { \ |
| 206 | gl_state.use_global = 0; \ | 205 | gl_state.use_global = 0; \ |
| 207 | gl_state.current_syntax_table = current_buffer->syntax_table; \ | 206 | gl_state.current_syntax_table = BVAR (current_buffer, syntax_table);\ |
| 208 | } while (0) | 207 | } while (0) |
| 209 | 208 | ||
| 210 | /* This macro should be called with FROM at the start of forward | 209 | /* This macro should be called with FROM at the start of forward |
| @@ -231,7 +230,8 @@ do \ | |||
| 231 | while (0) | 230 | while (0) |
| 232 | 231 | ||
| 233 | /* Same as above, but in OBJECT. If OBJECT is nil, use current buffer. | 232 | /* Same as above, but in OBJECT. If OBJECT is nil, use current buffer. |
| 234 | If it is t, ignore properties altogether. | 233 | If it is t (which is only used in fast_c_string_match_ignore_case), |
| 234 | ignore properties altogether. | ||
| 235 | 235 | ||
| 236 | This is meant for regex.c to use. For buffers, regex.c passes arguments | 236 | This is meant for regex.c to use. For buffers, regex.c passes arguments |
| 237 | to the UPDATE_SYNTAX_TABLE macros which are relative to BEGV. | 237 | to the UPDATE_SYNTAX_TABLE macros which are relative to BEGV. |
| @@ -258,7 +258,7 @@ do \ | |||
| 258 | else if (EQ (gl_state.object, Qt)) \ | 258 | else if (EQ (gl_state.object, Qt)) \ |
| 259 | { \ | 259 | { \ |
| 260 | gl_state.b_property = 0; \ | 260 | gl_state.b_property = 0; \ |
| 261 | gl_state.e_property = 1500000000; \ | 261 | gl_state.e_property = MOST_POSITIVE_FIXNUM; \ |
| 262 | gl_state.offset = 0; \ | 262 | gl_state.offset = 0; \ |
| 263 | } \ | 263 | } \ |
| 264 | else \ | 264 | else \ |
| @@ -277,15 +277,15 @@ while (0) | |||
| 277 | struct gl_state_s | 277 | struct gl_state_s |
| 278 | { | 278 | { |
| 279 | Lisp_Object object; /* The object we are scanning. */ | 279 | Lisp_Object object; /* The object we are scanning. */ |
| 280 | int start; /* Where to stop. */ | 280 | EMACS_INT start; /* Where to stop. */ |
| 281 | int stop; /* Where to stop. */ | 281 | EMACS_INT stop; /* Where to stop. */ |
| 282 | int use_global; /* Whether to use global_code | 282 | int use_global; /* Whether to use global_code |
| 283 | or c_s_t. */ | 283 | or c_s_t. */ |
| 284 | Lisp_Object global_code; /* Syntax code of current char. */ | 284 | Lisp_Object global_code; /* Syntax code of current char. */ |
| 285 | Lisp_Object current_syntax_table; /* Syntax table for current pos. */ | 285 | Lisp_Object current_syntax_table; /* Syntax table for current pos. */ |
| 286 | Lisp_Object old_prop; /* Syntax-table prop at prev pos. */ | 286 | Lisp_Object old_prop; /* Syntax-table prop at prev pos. */ |
| 287 | int b_property; /* First index where c_s_t is valid. */ | 287 | EMACS_INT b_property; /* First index where c_s_t is valid. */ |
| 288 | int e_property; /* First index where c_s_t is | 288 | EMACS_INT e_property; /* First index where c_s_t is |
| 289 | not valid. */ | 289 | not valid. */ |
| 290 | INTERVAL forward_i; /* Where to start lookup on forward */ | 290 | INTERVAL forward_i; /* Where to start lookup on forward */ |
| 291 | INTERVAL backward_i; /* or backward movement. The | 291 | INTERVAL backward_i; /* or backward movement. The |
| @@ -295,9 +295,8 @@ struct gl_state_s | |||
| 295 | intervals too, depending | 295 | intervals too, depending |
| 296 | on: */ | 296 | on: */ |
| 297 | /* Offset for positions specified to UPDATE_SYNTAX_TABLE. */ | 297 | /* Offset for positions specified to UPDATE_SYNTAX_TABLE. */ |
| 298 | int offset; | 298 | EMACS_INT offset; |
| 299 | }; | 299 | }; |
| 300 | 300 | ||
| 301 | extern struct gl_state_s gl_state; | 301 | extern struct gl_state_s gl_state; |
| 302 | extern EMACS_INT scan_words (EMACS_INT, EMACS_INT); | 302 | extern EMACS_INT scan_words (EMACS_INT, EMACS_INT); |
| 303 | |||