comparison src/buffer.h @ 373:6240c7796c7a r21-2b2

Import from CVS: tag r21-2b2
author cvs
date Mon, 13 Aug 2007 11:04:06 +0200
parents cc15677e0335
children 8626e4521993
comparison
equal deleted inserted replaced
372:49e1ed2d7ed8 373:6240c7796c7a
100 positions. */ 100 positions. */
101 Bufpos mule_bufpos_cache[16]; 101 Bufpos mule_bufpos_cache[16];
102 Bytind mule_bytind_cache[16]; 102 Bytind mule_bytind_cache[16];
103 #endif 103 #endif
104 104
105 /* Similar to the above, we keep track of positions for which line
106 number has last been calculated. See line-number.c. */
107 Lisp_Object line_number_cache;
108
105 /* Change data that goes with the text. */ 109 /* Change data that goes with the text. */
106 struct buffer_text_change_data *changes; 110 struct buffer_text_change_data *changes;
107 111
108 }; 112 };
109 113
230 #define CONCHECK_LIVE_BUFFER(x) do { \ 234 #define CONCHECK_LIVE_BUFFER(x) do { \
231 CONCHECK_BUFFER (x); \ 235 CONCHECK_BUFFER (x); \
232 if (!BUFFER_LIVE_P (XBUFFER (x))) \ 236 if (!BUFFER_LIVE_P (XBUFFER (x))) \
233 x = wrong_type_argument (Qbuffer_live_p, (x)); \ 237 x = wrong_type_argument (Qbuffer_live_p, (x)); \
234 } while (0) 238 } while (0)
239
240 #define BUFFER_BASE_BUFFER(b) ((b)->base_buffer ? (b)->base_buffer : (b))
241
242 /* Map over buffers sharing the same text as MPS_BUF. MPS_BUFVAR is a
243 variable that gets the buffer values (beginning with the base
244 buffer, then the children), and MPS_BUFCONS should be a temporary
245 Lisp_Object variable. */
246 #define MAP_INDIRECT_BUFFERS(mps_buf, mps_bufvar, mps_bufcons) \
247 for (mps_bufcons = Qunbound, \
248 mps_bufvar = BUFFER_BASE_BUFFER (mps_buf); \
249 UNBOUNDP (mps_bufcons) ? \
250 (mps_bufcons = mps_bufvar->indirect_children, \
251 1) \
252 : (!NILP (mps_bufcons) \
253 && (mps_bufvar = XBUFFER (XCAR (mps_bufcons)), 1) \
254 && (mps_bufcons = XCDR (mps_bufcons), 1)); \
255 )
235 256
236 257
237 /* NOTE: In all the following macros, we follow these rules concerning 258 /* NOTE: In all the following macros, we follow these rules concerning
238 multiple evaluation of the arguments: 259 multiple evaluation of the arguments:
239 260