diff options
| author | Karoly Lorentey | 2005-09-04 03:48:17 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-09-04 03:48:17 +0000 |
| commit | fbf349734468d48b421c3d03074bb66dfcf3115b (patch) | |
| tree | 0a7d1ee844b6c591a5a499d23e35931945106e5a /src/syntax.c | |
| parent | f0caabd962b662cccbea472995d86af718cc8d0b (diff) | |
| parent | 4b5fa40e1f1ba3cafde672863a0331311d1c2695 (diff) | |
| download | emacs-fbf349734468d48b421c3d03074bb66dfcf3115b.tar.gz emacs-fbf349734468d48b421c3d03074bb66dfcf3115b.zip | |
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Patches applied:
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0
tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1
Add CVS metadata files.
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2
Update from CVS.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/syntax.c b/src/syntax.c index 480fa6de82a..2043cff63d6 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* GNU Emacs routines to deal with syntax tables; also word and list parsing. | 1 | /* GNU Emacs routines to deal with syntax tables; also word and list parsing. |
| 2 | Copyright (C) 1985, 87, 93, 94, 95, 97, 1998, 1999, 2004 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2002, |
| 3 | 2003, 2004, 2005 Free Software Foundation, Inc. | ||
| 3 | 4 | ||
| 4 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 5 | 6 | ||
| @@ -132,7 +133,7 @@ update_syntax_table (charpos, count, init, object) | |||
| 132 | { | 133 | { |
| 133 | Lisp_Object tmp_table; | 134 | Lisp_Object tmp_table; |
| 134 | int cnt = 0, invalidate = 1; | 135 | int cnt = 0, invalidate = 1; |
| 135 | INTERVAL i, oldi; | 136 | INTERVAL i; |
| 136 | 137 | ||
| 137 | if (init) | 138 | if (init) |
| 138 | { | 139 | { |
| @@ -163,7 +164,7 @@ update_syntax_table (charpos, count, init, object) | |||
| 163 | gl_state.e_property = INTERVAL_LAST_POS (i) - gl_state.offset; | 164 | gl_state.e_property = INTERVAL_LAST_POS (i) - gl_state.offset; |
| 164 | goto update; | 165 | goto update; |
| 165 | } | 166 | } |
| 166 | oldi = i = count > 0 ? gl_state.forward_i : gl_state.backward_i; | 167 | i = count > 0 ? gl_state.forward_i : gl_state.backward_i; |
| 167 | 168 | ||
| 168 | /* We are guaranteed to be called with CHARPOS either in i, | 169 | /* We are guaranteed to be called with CHARPOS either in i, |
| 169 | or further off. */ | 170 | or further off. */ |
| @@ -248,7 +249,8 @@ update_syntax_table (charpos, count, init, object) | |||
| 248 | } | 249 | } |
| 249 | else | 250 | else |
| 250 | { | 251 | { |
| 251 | gl_state.b_property = i->position + LENGTH (i) - gl_state.offset; | 252 | gl_state.b_property |
| 253 | = i->position + LENGTH (i) - gl_state.offset; | ||
| 252 | gl_state.backward_i = i; | 254 | gl_state.backward_i = i; |
| 253 | } | 255 | } |
| 254 | return; | 256 | return; |
| @@ -257,7 +259,12 @@ update_syntax_table (charpos, count, init, object) | |||
| 257 | { | 259 | { |
| 258 | if (count > 0) | 260 | if (count > 0) |
| 259 | { | 261 | { |
| 260 | gl_state.e_property = i->position + LENGTH (i) - gl_state.offset; | 262 | gl_state.e_property |
| 263 | = i->position + LENGTH (i) - gl_state.offset | ||
| 264 | /* e_property at EOB is not set to ZV but to ZV+1, so that | ||
| 265 | we can do INC(from);UPDATE_SYNTAX_TABLE_FORWARD without | ||
| 266 | having to check eob between the two. */ | ||
| 267 | + (NULL_INTERVAL_P (next_interval (i)) ? 1 : 0); | ||
| 261 | gl_state.forward_i = i; | 268 | gl_state.forward_i = i; |
| 262 | } | 269 | } |
| 263 | else | 270 | else |
| @@ -3168,6 +3175,14 @@ syms_of_syntax () | |||
| 3168 | 3175 | ||
| 3169 | staticpro (&Vsyntax_code_object); | 3176 | staticpro (&Vsyntax_code_object); |
| 3170 | 3177 | ||
| 3178 | staticpro (&gl_state.object); | ||
| 3179 | staticpro (&gl_state.global_code); | ||
| 3180 | staticpro (&gl_state.current_syntax_table); | ||
| 3181 | staticpro (&gl_state.old_prop); | ||
| 3182 | |||
| 3183 | /* Defined in regex.c */ | ||
| 3184 | staticpro (&re_match_object); | ||
| 3185 | |||
| 3171 | Qscan_error = intern ("scan-error"); | 3186 | Qscan_error = intern ("scan-error"); |
| 3172 | staticpro (&Qscan_error); | 3187 | staticpro (&Qscan_error); |
| 3173 | Fput (Qscan_error, Qerror_conditions, | 3188 | Fput (Qscan_error, Qerror_conditions, |