summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 4003be5c8c4..8c596835fcc 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -857,6 +857,15 @@ struct buffer
};
+/* 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;