From d5a1acfaa5671f09cbb8da211a5283394d8b907f Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Thu, 15 Aug 2013 18:52:53 +0400 Subject: * 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. --- src/buffer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/buffer.h') 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. */ -- cgit v1.2.1