New macro to iterate over all buffers, miscellaneous cleanups.
[bpt/emacs.git] / src / buffer.h
index 0615f85..8c59683 100644 (file)
@@ -857,6 +857,15 @@ struct buffer
 };
 
 \f
+/* Chain of all buffers, including killed ones.  */
+
+extern struct buffer *all_buffers;
+
+/* Used to iterate over the chain above.  */
+
+#define for_each_buffer(b) \
+  for ((b) = all_buffers; (b); (b) = (b)->header.next.buffer)
+
 /* This points to the current buffer.  */
 
 extern struct buffer *current_buffer;
@@ -971,10 +980,6 @@ BUF_FETCH_MULTIBYTE_CHAR (struct buffer *buf, ptrdiff_t pos)
 \f
 /* Overlays */
 
-/* 1 if the OV is an overlay object.  */
-
-#define OVERLAY_VALID(OV) (OVERLAYP (OV))
-
 /* Return the marker that stands for where OV starts in the buffer.  */
 
 #define OVERLAY_START(OV) (XOVERLAY (OV)->start)