diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-12-15 09:07:52 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-12-15 09:08:27 -0800 |
commit | e019c35df60a306750e1025db99c36701a726ecb (patch) | |
tree | 1f7f35715aa20cbbb6c63ee1091161906f00980e /src/frame.h | |
parent | d64b88da2fcc23cb0676fca382b4ddc7d1b68020 (diff) | |
download | emacs-e019c35df60a306750e1025db99c36701a726ecb.tar.gz emacs-e019c35df60a306750e1025db99c36701a726ecb.tar.bz2 emacs-e019c35df60a306750e1025db99c36701a726ecb.zip |
FOR_EACH_FRAME no longer assumes frame-list
This cleans up a recent fix related to Bug#29661.
Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2017-12/msg00544.html
* src/frame.c (next_frame, prev_frame, delete_frame):
Restore debugging checks that Vframe_list is non-nil,
as FOR_EACH_FRAME no longer has these checks.
(delete_frame): Remove no-longer-needed checks that Vframe_list is
non-nil, as FOR_EACH_FRAME no longer assumes that.
* src/frame.h (FOR_EACH_FRAME): Do not assume Vframe_list is non-nil.
Diffstat (limited to 'src/frame.h')
-rw-r--r-- | src/frame.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/frame.h b/src/frame.h index a3b77636435..a5d4e4fc88b 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1149,8 +1149,7 @@ 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. Vframe_list - should be nonempty, so the body is executed at least once. LIST_VAR + Vframe_list in succession and execute the statement. 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. @@ -1160,7 +1159,7 @@ default_pixels_per_inch_y (void) something which executes the statement once. */ #define FOR_EACH_FRAME(list_var, frame_var) \ - for ((list_var) = (eassume (CONSP (Vframe_list)), Vframe_list); \ + for ((list_var) = Vframe_list; \ (CONSP (list_var) \ && (frame_var = XCAR (list_var), true)); \ list_var = XCDR (list_var)) |