Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/buffer.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/buffer.h Mon Aug 13 11:04:06 2007 +0200 @@ -102,6 +102,10 @@ Bytind mule_bytind_cache[16]; #endif + /* Similar to the above, we keep track of positions for which line + number has last been calculated. See line-number.c. */ + Lisp_Object line_number_cache; + /* Change data that goes with the text. */ struct buffer_text_change_data *changes; @@ -233,6 +237,23 @@ x = wrong_type_argument (Qbuffer_live_p, (x)); \ } while (0) +#define BUFFER_BASE_BUFFER(b) ((b)->base_buffer ? (b)->base_buffer : (b)) + +/* Map over buffers sharing the same text as MPS_BUF. MPS_BUFVAR is a + variable that gets the buffer values (beginning with the base + buffer, then the children), and MPS_BUFCONS should be a temporary + Lisp_Object variable. */ +#define MAP_INDIRECT_BUFFERS(mps_buf, mps_bufvar, mps_bufcons) \ +for (mps_bufcons = Qunbound, \ + mps_bufvar = BUFFER_BASE_BUFFER (mps_buf); \ + UNBOUNDP (mps_bufcons) ? \ + (mps_bufcons = mps_bufvar->indirect_children, \ + 1) \ + : (!NILP (mps_bufcons) \ + && (mps_bufvar = XBUFFER (XCAR (mps_bufcons)), 1) \ + && (mps_bufcons = XCDR (mps_bufcons), 1)); \ + ) + /* NOTE: In all the following macros, we follow these rules concerning multiple evaluation of the arguments: