aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorGerd Moellmann2000-11-19 15:20:27 +0000
committerGerd Moellmann2000-11-19 15:20:27 +0000
commitcd2904bd2c06864bc02f3e454caccdeb3f0e03f2 (patch)
tree20b1d71e9eabc2e5dcd63adcbed3dea1bb79753d /src/window.c
parentb95b34e5decc2280a749123f9ee85b428cd0f400 (diff)
downloademacs-cd2904bd2c06864bc02f3e454caccdeb3f0e03f2.tar.gz
emacs-cd2904bd2c06864bc02f3e454caccdeb3f0e03f2.zip
(Fwindow_list): Change parameter list to be XEmacs
compatible. (window_list_1): New function. (window_loop): Use it instead of Fwindow_list.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c
index 4c755a3f03e..d3386c31a2a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -79,6 +79,7 @@ static void decode_next_window_args P_ ((Lisp_Object *, Lisp_Object *,
79static int foreach_window_1 P_ ((struct window *, 79static int foreach_window_1 P_ ((struct window *,
80 int (* fn) (struct window *, void *), 80 int (* fn) (struct window *, void *),
81 void *)); 81 void *));
82static Lisp_Object window_list_1 P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
82 83
83/* This is the window in which the terminal's cursor should 84/* This is the window in which the terminal's cursor should
84 be left when nothing is being done with it. This must 85 be left when nothing is being done with it. This must
@@ -1549,9 +1550,35 @@ argument ALL_FRAMES is non-nil, cycle through all frames.")
1549 1550
1550 1551
1551DEFUN ("window-list", Fwindow_list, Swindow_list, 0, 3, 0, 1552DEFUN ("window-list", Fwindow_list, Swindow_list, 0, 3, 0,
1552 "Return a list of windows in canonical ordering.\n\ 1553 "Return a list of windows on FRAME, starting with WINDOW.\n\
1553Arguments are like for `next-window'.") 1554FRAME nil or omitted means use the selected frame.\n\
1554 (window, minibuf, all_frames) 1555WINDOW nil or omitted means use the selected window.\n\
1556MINIBUF t means include the minibuffer window, even if it isn't active.\n\
1557MINIBUF nil or omitted means include the minibuffer window only\n\
1558if it's active.\n\
1559MINIBUF neither nil nor t means never include the minibuffer window.")
1560 (frame, minibuf, window)
1561 Lisp_Object frame, minibuf, window;
1562{
1563 Lisp_Object list;
1564
1565 if (NILP (window))
1566 window = selected_window;
1567 if (NILP (frame))
1568 frame = selected_frame;
1569
1570 if (!EQ (frame, XWINDOW (window)->frame))
1571 error ("Window is on a different frame");
1572
1573 return window_list_1 (window, minibuf, frame);
1574}
1575
1576
1577/* Return a list of windows in canonical ordering. Arguments are like
1578 for `next-window'. */
1579
1580static Lisp_Object
1581window_list_1 (window, minibuf, all_frames)
1555 Lisp_Object window, minibuf, all_frames; 1582 Lisp_Object window, minibuf, all_frames;
1556{ 1583{
1557 Lisp_Object tail, list; 1584 Lisp_Object tail, list;
@@ -1637,7 +1664,7 @@ window_loop (type, obj, mini, frames)
1637 We can't just wait until we hit the first window again, because 1664 We can't just wait until we hit the first window again, because
1638 it might be deleted. */ 1665 it might be deleted. */
1639 1666
1640 windows = Fwindow_list (window, mini ? Qt : Qnil, frame_arg); 1667 windows = window_list_1 (window, mini ? Qt : Qnil, frame_arg);
1641 GCPRO1 (windows); 1668 GCPRO1 (windows);
1642 best_window = Qnil; 1669 best_window = Qnil;
1643 1670