# HG changeset patch # User Gerd Moellmann # Date 941458480 0 # Node ID 6e6ad5d672630aec98212c002a20faadff4fc8c9 # Parent 0af8b2c70e22f5d7cc6b651f3d9436e57756a3ee (walk-windows): If ALL-FRAMES is a frame, start on that frame. Use save-selected-window. diff -r 0af8b2c70e22 -r 6e6ad5d67263 lisp/window.el --- a/lisp/window.el Mon Nov 01 11:44:58 1999 +0000 +++ b/lisp/window.el Mon Nov 01 12:14:40 1999 +0000 @@ -62,17 +62,21 @@ 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."