aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-09-19 23:43:06 +0300
committerJuri Linkov2019-09-19 23:43:06 +0300
commita6894cf0c32c0cc50f1a45cb51117ce01446d666 (patch)
tree7c18be3d514a7d4b385a8a986b84b6101156a47e
parenta81223aeaa0d89954a10d9b5912665aedb0b9c74 (diff)
downloademacs-a6894cf0c32c0cc50f1a45cb51117ce01446d666.tar.gz
emacs-a6894cf0c32c0cc50f1a45cb51117ce01446d666.zip
* lisp/window.el (walk-windows): Simplify to use WINDOW arg of window-list-1
instead of calling select-window (bug#35385).
-rw-r--r--lisp/window.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/window.el b/lisp/window.el
index cf733153b89..620eacdd290 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2217,6 +2217,10 @@ non-nil values of ALL-FRAMES have special meanings:
2217 2217
2218- A frame means consider all windows on that frame only. 2218- A frame means consider all windows on that frame only.
2219 2219
2220If ALL-FRAMES specifies a frame, the first window walked is the
2221first window on that frame (the one returned by `frame-first-window'),
2222not necessarily the selected window.
2223
2220Anything else means consider all windows on the selected frame 2224Anything else means consider all windows on the selected frame
2221and no others. 2225and no others.
2222 2226
@@ -2226,13 +2230,13 @@ windows nor the buffer list."
2226 ;; back to it. 2230 ;; back to it.
2227 (when (window-minibuffer-p) 2231 (when (window-minibuffer-p)
2228 (setq minibuf t)) 2232 (setq minibuf t))
2229 ;; Make sure to not mess up the order of recently selected 2233 ;; Use `save-selected-window' to prevent FUN from messing up
2230 ;; windows. Use `save-selected-window' and `select-window' 2234 ;; the order of windows when it changes the selected window.
2231 ;; with second argument non-nil for this purpose.
2232 (save-selected-window 2235 (save-selected-window
2233 (when (framep all-frames) 2236 (dolist (walk-windows-window
2234 (select-window (frame-first-window all-frames) 'norecord)) 2237 (window-list-1 (and (framep all-frames)
2235 (dolist (walk-windows-window (window-list-1 nil minibuf all-frames)) 2238 (frame-first-window all-frames))
2239 minibuf all-frames))
2236 (funcall fun walk-windows-window)))) 2240 (funcall fun walk-windows-window))))
2237 2241
2238(defun window-at-side-p (&optional window side) 2242(defun window-at-side-p (&optional window side)