aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-03-18 22:50:00 +0000
committerJim Blandy1993-03-18 22:50:00 +0000
commit35f56f9681229c3173e7f168f2c15e2bc6ceef5d (patch)
treec4922edb0e48d9a9d1fbc7622f195889dc16b15f
parent9789a4beb3a652523587ab1f86d49ea138f7856a (diff)
downloademacs-35f56f9681229c3173e7f168f2c15e2bc6ceef5d.tar.gz
emacs-35f56f9681229c3173e7f168f2c15e2bc6ceef5d.zip
* frame.h (FOR_EACH_FRAME): Change the definition so that
FRAME_VAR is a lisp object. * dispnew.c (WINDOW_CHANGE_SIGNAL, do_pending_window_change): Adjusted appropriately. * xdisp.c (redisplay): Adjusted appropriately. * dispnew.c (Fredraw_frame): Give this appropriate definitions for MULTI_FRAME and non-MULTI_FRAME configurations. (Fredraw_display): Give this a non-MULTI_FRAME-dependent definition.
-rw-r--r--src/dispnew.c85
-rw-r--r--src/frame.h12
-rw-r--r--src/xdisp.c14
3 files changed, 55 insertions, 56 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 6937e9a1cfc..84c5fbfaeff 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -165,36 +165,6 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0,
165 return Qnil; 165 return Qnil;
166} 166}
167 167
168DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
169 "Clear and redisplay all visible frames.")
170 ()
171{
172 Lisp_Object frame, tail;
173
174 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
175 {
176 frame = XCONS (tail)->car;
177
178 /* If we simply redrew all visible frames, whether or not they
179 were garbaged, then this would make all frames clear and
180 redraw whenever a new frame is created or an existing frame
181 is de-iconified; those events set the global frame_garbaged
182 flag, to which redisplay responds by calling this function.
183
184 This used to redraw all visible frames; the only advantage of
185 that approach is that if a frame changes from invisible to
186 visible without setting its garbaged flag, it still gets
187 redisplayed. But that should never happen; since invisible
188 frames are not updated, they should always be marked as
189 garbaged when they become visible again. If that doesn't
190 happen, it's a bug in the visibility code, not a bug here. */
191 if (FRAME_VISIBLE_P (XFRAME (frame))
192 && FRAME_GARBAGED_P (XFRAME (frame)))
193 Fredraw_frame (frame);
194 }
195 return Qnil;
196}
197
198redraw_frame (f) 168redraw_frame (f)
199 FRAME_PTR f; 169 FRAME_PTR f;
200{ 170{
@@ -203,11 +173,12 @@ redraw_frame (f)
203 Fredraw_frame (frame); 173 Fredraw_frame (frame);
204} 174}
205 175
206#else /* not MULTI_FRAME */ 176#else
207 177
208DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", 178DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, "",
209 "Clear screen and output again what is supposed to appear on it.") 179 "Clear frame FRAME and output again what is supposed to appear on it.")
210 () 180 (frame)
181 Lisp_Object frame;
211{ 182{
212 update_begin (0); 183 update_begin (0);
213 set_terminal_modes (); 184 set_terminal_modes ();
@@ -222,7 +193,35 @@ DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
222 return Qnil; 193 return Qnil;
223} 194}
224 195
225#endif /* not MULTI_FRAME */ 196#endif
197
198DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
199 "Clear and redisplay all visible frames.")
200 ()
201{
202 Lisp_Object tail, frame;
203
204 FOR_EACH_FRAME (tail, frame)
205 /* If we simply redrew all visible frames, whether or not they
206 were garbaged, then this would make all frames clear and
207 nredraw whenever a new frame is created or an existing frame
208 is de-iconified; those events set the global frame_garbaged
209 flag, to which redisplay responds by calling this function.
210
211 This used to redraw all visible frames; the only advantage of
212 that approach is that if a frame changes from invisible to
213 visible without setting its garbaged flag, it still gets
214 redisplayed. But that should never happen; since invisible
215 frames are not updated, they should always be marked as
216 garbaged when they become visible again. If that doesn't
217 happen, it's a bug in the visibility code, not a bug here. */
218 if (FRAME_VISIBLE_P (XFRAME (frame))
219 && FRAME_GARBAGED_P (XFRAME (frame)))
220 Fredraw_frame (frame);
221
222 return Qnil;
223}
224
226 225
227static struct frame_glyphs * 226static struct frame_glyphs *
228make_frame_glyphs (frame, empty) 227make_frame_glyphs (frame, empty)
@@ -1605,14 +1604,13 @@ window_change_signal ()
1605 later outside of the signal handler. */ 1604 later outside of the signal handler. */
1606 1605
1607 { 1606 {
1608 Lisp_Object tail; 1607 Lisp_Object tail, frame;
1609 FRAME_PTR f;
1610 1608
1611 FOR_EACH_FRAME (tail, f) 1609 FOR_EACH_FRAME (tail, frame)
1612 { 1610 {
1613 if (FRAME_TERMCAP_P (f)) 1611 if (FRAME_TERMCAP_P (XFRAME (frame)))
1614 { 1612 {
1615 change_frame_size (f, height, width, 0, 1); 1613 change_frame_size (XFRAME (frame), height, width, 0, 1);
1616 break; 1614 break;
1617 } 1615 }
1618 } 1616 }
@@ -1631,13 +1629,14 @@ do_pending_window_change ()
1631 /* If window_change_signal should have run before, run it now. */ 1629 /* If window_change_signal should have run before, run it now. */
1632 while (delayed_size_change) 1630 while (delayed_size_change)
1633 { 1631 {
1634 Lisp_Object tail; 1632 Lisp_Object tail, frame;
1635 FRAME_PTR f;
1636 1633
1637 delayed_size_change = 0; 1634 delayed_size_change = 0;
1638 1635
1639 FOR_EACH_FRAME (tail, f) 1636 FOR_EACH_FRAME (tail, frame)
1640 { 1637 {
1638 FRAME_PTR f = XFRAME (frame);
1639
1641 int height = FRAME_NEW_HEIGHT (f); 1640 int height = FRAME_NEW_HEIGHT (f);
1642 int width = FRAME_NEW_WIDTH (f); 1641 int width = FRAME_NEW_WIDTH (f);
1643 1642
diff --git a/src/frame.h b/src/frame.h
index 914d2ffba10..0f7ac736545 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -317,9 +317,9 @@ typedef struct frame *FRAME_PTR;
317 317
318/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a 318/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
319 `for' loop which iterates over the elements of Vframe_list. The 319 `for' loop which iterates over the elements of Vframe_list. The
320 loop will set FRAME_VAR, a FRAME_PTR, to each frame in 320 loop will set FRAME_VAR, a Lisp_Object, to each frame in
321 Vframe_list in succession and execute the statement. LIST_VAR 321 Vframe_list in succession and execute the statement. LIST_VAR
322 should be a Lisp_Object; it is used to iterate through the 322 should be a Lisp_Object too; it is used to iterate through the
323 Vframe_list. 323 Vframe_list.
324 324
325 If MULTI_FRAME isn't defined, then this loop expands to something which 325 If MULTI_FRAME isn't defined, then this loop expands to something which
@@ -327,7 +327,7 @@ typedef struct frame *FRAME_PTR;
327#define FOR_EACH_FRAME(list_var, frame_var) \ 327#define FOR_EACH_FRAME(list_var, frame_var) \
328 for ((list_var) = Vframe_list; \ 328 for ((list_var) = Vframe_list; \
329 (CONSP (list_var) \ 329 (CONSP (list_var) \
330 && (frame_var = XFRAME (XCONS (list_var)->car), 1)); \ 330 && (frame_var = XCONS (list_var)->car, 1)); \
331 list_var = XCONS (list_var)->cdr) 331 list_var = XCONS (list_var)->cdr)
332 332
333 333
@@ -412,16 +412,16 @@ extern int last_nonminibuf_frame;
412 412
413/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a 413/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
414 `for' loop which iterates over the elements of Vframe_list. The 414 `for' loop which iterates over the elements of Vframe_list. The
415 loop will set FRAME_VAR, a FRAME_PTR, to each frame in 415 loop will set FRAME_VAR, a Lisp_Object, to each frame in
416 Vframe_list in succession and execute the statement. LIST_VAR 416 Vframe_list in succession and execute the statement. LIST_VAR
417 should be a Lisp_Object; it is used to iterate through the 417 should be a Lisp_Object too; it is used to iterate through the
418 Vframe_list. 418 Vframe_list.
419 419
420 If MULTI_FRAME _is_ defined, then this loop expands to a real 420 If MULTI_FRAME _is_ defined, then this loop expands to a real
421 `for' loop which traverses Vframe_list using LIST_VAR and 421 `for' loop which traverses Vframe_list using LIST_VAR and
422 FRAME_VAR. */ 422 FRAME_VAR. */
423#define FOR_EACH_FRAME(list_var, frame_var) \ 423#define FOR_EACH_FRAME(list_var, frame_var) \
424 for (frame_var = (FRAME_PTR) 1; frame_var; frame_var = (FRAME_PTR) 0) 424 for (list_var = Qt; frame_var = selected_frame, ! NILP (list_var); list_var = Qnil)
425 425
426#endif /* not MULTI_FRAME */ 426#endif /* not MULTI_FRAME */
427 427
diff --git a/src/xdisp.c b/src/xdisp.c
index 02a70af1b24..ee8d744958e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -369,11 +369,10 @@ redisplay ()
369 to know if their frames are visible. 369 to know if their frames are visible.
370 See the comment in frame.h for FRAME_SAMPLE_VISIBILITY. */ 370 See the comment in frame.h for FRAME_SAMPLE_VISIBILITY. */
371 { 371 {
372 Lisp_Object tail; 372 Lisp_Object tail, frame;
373 FRAME_PTR f;
374 373
375 FOR_EACH_FRAME (tail, f) 374 FOR_EACH_FRAME (tail, frame)
376 FRAME_SAMPLE_VISIBILITY (f); 375 FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
377 } 376 }
378 377
379 /* Notice any pending interrupt request to change frame size. */ 378 /* Notice any pending interrupt request to change frame size. */
@@ -504,15 +503,16 @@ redisplay ()
504 503
505 if (all_windows) 504 if (all_windows)
506 { 505 {
507 Lisp_Object tail; 506 Lisp_Object tail, frame;
508 FRAME_PTR f;
509 507
510 /* Recompute # windows showing selected buffer. 508 /* Recompute # windows showing selected buffer.
511 This will be incremented each time such a window is displayed. */ 509 This will be incremented each time such a window is displayed. */
512 buffer_shared = 0; 510 buffer_shared = 0;
513 511
514 FOR_EACH_FRAME (tail, f) 512 FOR_EACH_FRAME (tail, frame)
515 { 513 {
514 FRAME_PTR f = XFRAME (frame);
515
516 /* Mark all the scroll bars to be removed; we'll redeem the ones 516 /* Mark all the scroll bars to be removed; we'll redeem the ones
517 we want when we redisplay their windows. */ 517 we want when we redisplay their windows. */
518 if (condemn_scroll_bars_hook) 518 if (condemn_scroll_bars_hook)