summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frame.h b/src/frame.h
index 376df528466..84f9a05d774 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1111,7 +1111,8 @@ default_pixels_per_inch_y (void)
/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
`for' loop which iterates over the elements of Vframe_list. The
loop will set FRAME_VAR, a Lisp_Object, to each frame in
- Vframe_list in succession and execute the statement. LIST_VAR
+ Vframe_list in succession and execute the statement. Vframe_list
+ should be nonempty, so the body is executed at least once. LIST_VAR
should be a Lisp_Object too; it is used to iterate through the
Vframe_list. Note that this macro walks over child frames and
the tooltip frame as well.
@@ -1121,7 +1122,7 @@ default_pixels_per_inch_y (void)
something which executes the statement once. */
#define FOR_EACH_FRAME(list_var, frame_var) \
- for ((list_var) = Vframe_list; \
+ for ((list_var) = (eassume (CONSP (Vframe_list)), Vframe_list); \
(CONSP (list_var) \
&& (frame_var = XCAR (list_var), true)); \
list_var = XCDR (list_var))