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