From aeb721fe9ca9239ad9ca0fe6b2fe4f57f97da9c2 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 1 Nov 1999 12:15:41 +0000 Subject: [PATCH] (walk-windows): If ALL-FRAMES is a frame, start on that frame. Use save-selected-window. --- lisp/ChangeLog | 5 +++++ lisp/window.el | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9721ec5d0f3..2ede4abe932 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +1999-11-01 Richard M. Stallman + + * window.el (walk-windows): If ALL-FRAMES is a frame, + start on that frame. Use save-selected-window. + 1999-11-01 Gerd Moellmann * simple.el (end-of-buffer): Use window-end to find the window end diff --git a/lisp/window.el b/lisp/window.el index c26b79af485..e5639a50827 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -62,17 +62,21 @@ ALL-FRAMES nil or omitted means cycle within the frames as specified above. ALL-FRAMES = `visible' means include windows on all visible frames. ALL-FRAMES = 0 means include windows on all visible and iconified frames. ALL-FRAMES = t means include windows on all frames including invisible frames. +If ALL-FRAMES is a frame, it means include windows on that frame. Anything else means restrict to the selected frame." ;; If we start from the minibuffer window, don't fail to come back to it. (if (window-minibuffer-p (selected-window)) (setq minibuf t)) - (let* ((walk-windows-start (selected-window)) - (walk-windows-current walk-windows-start)) - (while (progn - (setq walk-windows-current - (next-window walk-windows-current minibuf all-frames)) - (funcall proc walk-windows-current) - (not (eq walk-windows-current walk-windows-start)))))) + (save-selected-window + (if (framep all-frames) + (select-window (frame-first-window all-frames))) + (let* ((walk-windows-start (selected-window)) + (walk-windows-current walk-windows-start)) + (while (progn + (setq walk-windows-current + (next-window walk-windows-current minibuf all-frames)) + (funcall proc walk-windows-current) + (not (eq walk-windows-current walk-windows-start))))))) (defun minibuffer-window-active-p (window) "Return t if WINDOW (a minibuffer window) is now active." -- 2.39.5