Commit 5c3534ff authored by Glenn Morris's avatar Glenn Morris

* lisp/window.el (window--process-window-list): No-op if no processes.

This avoids an issue with save-selected-window (from walk-windows)
failing if frame.el is not loaded, eg if the terminal is resized
during startup of a -nw CANNOT_DUMP build.  (Bug#23369).
parent 734fb3ac
......@@ -8520,24 +8520,25 @@ A window is associated with a process if that window is
displaying that processes's buffer."
(let ((processes (process-list))
(process-windows nil))
(walk-windows
(lambda (window)
(let ((buffer (window-buffer window))
(iter processes))
(while (let ((process (car iter)))
(if (and (process-live-p process)
(eq buffer (process-buffer process)))
(let ((procwin (assq process process-windows)))
;; Add this window to the list of windows
;; displaying process.
(if procwin
(push window (cdr procwin))
(push (list process window) process-windows))
;; We found our process for this window, so
;; stop iterating over the process list.
nil)
(setf iter (cdr iter)))))))
1 t)
(if processes
(walk-windows
(lambda (window)
(let ((buffer (window-buffer window))
(iter processes))
(while (let ((process (car iter)))
(if (and (process-live-p process)
(eq buffer (process-buffer process)))
(let ((procwin (assq process process-windows)))
;; Add this window to the list of windows
;; displaying process.
(if procwin
(push window (cdr procwin))
(push (list process window) process-windows))
;; We found our process for this window, so
;; stop iterating over the process list.
nil)
(setf iter (cdr iter)))))))
1 t))
process-windows))
(defun window--adjust-process-windows ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment