diff options
author | Joseph Arceneaux <[email protected]> | 1992-10-01 00:56:11 +0000 |
---|---|---|
committer | Joseph Arceneaux <[email protected]> | 1992-10-01 00:56:11 +0000 |
commit | 1b92beaf6debd3d2164fe37b55913d6420cb230c (patch) | |
tree | ff7b994712caaf156da13b30b88097d349a180b1 /src | |
parent | 74d6d8c5d61de07aa8c3b7f2284863ab69ad8e14 (diff) |
* buffer.h: New macro TEMP_SET_PT. If intervals are used, SET_PT
and TEMP_SET_PT are function calls.
Similarly for BUF_SET_PT and BUF_TEMP_SET_PT.
Added DECLARE_INTERVALS to buffer structure to conditionally
compile an interval tree into it..
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/buffer.h b/src/buffer.h index a0e0602589..8628d81513 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -23,7 +23,21 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #endif /* lint */ +#ifdef USE_TEXT_PROPERTIES +#define SET_PT(position) (set_point ((position), current_buffer)) +#define TEMP_SET_PT(position) (temp_set_point ((position), current_buffer)) + +#define BUF_SET_PT(buffer, position) (set_point ((position), (buffer))) +#define BUF_TEMP_SET_PT(buffer, position) (temp_set_point ((position), (buffer))) + +#else /* don't support text properties */ + #define SET_PT(position) (current_buffer->text.pt = (position)) +#define TEMP_SET_PT(position) (current_buffer->text.pt = (position)) + +#define BUF_SET_PT(buffer, position) (buffer->text.pt = (position)) +#define BUF_TEMP_SET_PT(buffer, position) (buffer->text.pt = (position)) +#endif /* don't support text properties */ /* Character position of beginning of buffer. */ #define BEG (1) @@ -71,8 +85,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Now similar macros for a specified buffer. Note that many of these evaluate the buffer argument more than once. */ -#define BUF_SET_PT(buffer, position) (buffer->text.pt = (position)) - /* Character position of beginning of buffer. */ #define BUF_BEG(buf) (1) @@ -162,6 +174,9 @@ struct buffer the last time this buffer was displayed */ int last_window_start; + /* Properties of this buffer's text -- conditionally compiled. */ + DECLARE_INTERVALS + /* This is a special exception -- as this slot should not be marked by gc_sweep, and as it is not lisp-accessible as a local variable -- so we regard it as not really being of type |