Mercurial > emacs
comparison src/buffer.h @ 1286:fbd402838d8d
* 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..
| author | Joseph Arceneaux <jla@gnu.org> |
|---|---|
| date | Thu, 01 Oct 1992 00:56:11 +0000 |
| parents | 61c6983219ff |
| children | fa4c1f1c744d |
comparison
equal
deleted
inserted
replaced
| 1285:d50533e23dff | 1286:fbd402838d8d |
|---|---|
| 21 #ifdef lint | 21 #ifdef lint |
| 22 #include "undo.h" | 22 #include "undo.h" |
| 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) |
| 30 | 44 |
| 31 /* Character position of beginning of accessible range of buffer. */ | 45 /* Character position of beginning of accessible range of buffer. */ |
| 68 /* Size of gap. */ | 82 /* Size of gap. */ |
| 69 #define GAP_SIZE (current_buffer->text.gap_size) | 83 #define GAP_SIZE (current_buffer->text.gap_size) |
| 70 | 84 |
| 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 | |
| 74 #define BUF_SET_PT(buffer, position) (buffer->text.pt = (position)) | |
| 75 | 87 |
| 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 |
| 79 /* Character position of beginning of accessible range of buffer. */ | 91 /* Character position of beginning of accessible range of buffer. */ |
| 159 /* the value of text.modiff at the last auto-save. */ | 171 /* the value of text.modiff at the last auto-save. */ |
| 160 int auto_save_modified; | 172 int auto_save_modified; |
| 161 /* Position in buffer at which display started | 173 /* Position in buffer at which display started |
| 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; |
| 176 | |
| 177 /* Properties of this buffer's text -- conditionally compiled. */ | |
| 178 DECLARE_INTERVALS | |
| 164 | 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 |
| 168 Lisp_Object */ | 183 Lisp_Object */ |
