summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-08-15 18:52:53 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-08-15 18:52:53 +0400
commitd5a1acfaa5671f09cbb8da211a5283394d8b907f (patch)
treec3199331cb67605b2f7e04b5a5ebfe4298b1924a /src/buffer.h
parent5d89d9d256eed9bf4ebb982be28e50f7c4fc9e7c (diff)
downloademacs-d5a1acfaa5671f09cbb8da211a5283394d8b907f.tar.gz
* lisp.h (FOR_EACH_ALIST_VALUE): New macro
to do `for' loops over alist values. * buffer.h (FOR_EACH_BUFFER): * process.c (FOR_EACH_PROCESS): Use it. (handle_child_signal, status_notify, Fget_buffer_process) (kill_buffer_processes): Use FOR_EACH_PROCESS.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 221db39329a..55a9e8d2a1c 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1132,10 +1132,8 @@ extern Lisp_Object Qpriority, Qbefore_string, Qafter_string;
/* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is
a `for' loop which iterates over the buffers from Vbuffer_alist. */
-#define FOR_EACH_LIVE_BUFFER(list_var, buf_var) \
- for (list_var = Vbuffer_alist; \
- (CONSP (list_var) && (buf_var = XCDR (XCAR (list_var)), 1)); \
- list_var = XCDR (list_var))
+#define FOR_EACH_LIVE_BUFFER(list_var, buf_var) \
+ FOR_EACH_ALIST_VALUE (Vbuffer_alist, list_var, buf_var)
/* Get text properties of B. */