1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

* 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).
This commit is contained in:
Glenn Morris 2016-04-27 19:21:41 -04:00
parent 734fb3ac6c
commit 5c3534ffdc

View File

@ -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 ()