diff options
| author | Joseph Arceneaux | 1992-10-01 00:56:11 +0000 |
|---|---|---|
| committer | Joseph Arceneaux | 1992-10-01 00:56:11 +0000 |
| commit | 1b92beaf6debd3d2164fe37b55913d6420cb230c (patch) | |
| tree | ff7b994712caaf156da13b30b88097d349a180b1 /src/buffer.h | |
| parent | 74d6d8c5d61de07aa8c3b7f2284863ab69ad8e14 (diff) | |
| download | emacs-1b92beaf6debd3d2164fe37b55913d6420cb230c.tar.gz emacs-1b92beaf6debd3d2164fe37b55913d6420cb230c.zip | |
* 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/buffer.h')
| -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 a0e06025893..8628d815133 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -23,7 +23,21 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 23 | #endif /* lint */ | 23 | #endif /* lint */ |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | #ifdef USE_TEXT_PROPERTIES | ||
| 27 | #define SET_PT(position) (set_point ((position), current_buffer)) | ||
| 28 | #define TEMP_SET_PT(position) (temp_set_point ((position), current_buffer)) | ||
| 29 | |||
| 30 | #define BUF_SET_PT(buffer, position) (set_point ((position), (buffer))) | ||
| 31 | #define BUF_TEMP_SET_PT(buffer, position) (temp_set_point ((position), (buffer))) | ||
| 32 | |||
| 33 | #else /* don't support text properties */ | ||
| 34 | |||
| 26 | #define SET_PT(position) (current_buffer->text.pt = (position)) | 35 | #define SET_PT(position) (current_buffer->text.pt = (position)) |
| 36 | #define TEMP_SET_PT(position) (current_buffer->text.pt = (position)) | ||
| 37 | |||
| 38 | #define BUF_SET_PT(buffer, position) (buffer->text.pt = (position)) | ||
| 39 | #define BUF_TEMP_SET_PT(buffer, position) (buffer->text.pt = (position)) | ||
| 40 | #endif /* don't support text properties */ | ||
| 27 | 41 | ||
| 28 | /* Character position of beginning of buffer. */ | 42 | /* Character position of beginning of buffer. */ |
| 29 | #define BEG (1) | 43 | #define BEG (1) |
| @@ -71,8 +85,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 71 | /* Now similar macros for a specified buffer. | 85 | /* Now similar macros for a specified buffer. |
| 72 | Note that many of these evaluate the buffer argument more than once. */ | 86 | Note that many of these evaluate the buffer argument more than once. */ |
| 73 | 87 | ||
| 74 | #define BUF_SET_PT(buffer, position) (buffer->text.pt = (position)) | ||
| 75 | |||
| 76 | /* Character position of beginning of buffer. */ | 88 | /* Character position of beginning of buffer. */ |
| 77 | #define BUF_BEG(buf) (1) | 89 | #define BUF_BEG(buf) (1) |
| 78 | 90 | ||
| @@ -162,6 +174,9 @@ struct buffer | |||
| 162 | the last time this buffer was displayed */ | 174 | the last time this buffer was displayed */ |
| 163 | int last_window_start; | 175 | int last_window_start; |
| 164 | 176 | ||
| 177 | /* Properties of this buffer's text -- conditionally compiled. */ | ||
| 178 | DECLARE_INTERVALS | ||
| 179 | |||
| 165 | /* This is a special exception -- as this slot should not be | 180 | /* This is a special exception -- as this slot should not be |
| 166 | marked by gc_sweep, and as it is not lisp-accessible as | 181 | marked by gc_sweep, and as it is not lisp-accessible as |
| 167 | a local variable -- so we regard it as not really being of type | 182 | a local variable -- so we regard it as not really being of type |