]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/window.el (window--state-get-1): Check buffer-live-p in next-buffers
authorJuri Linkov <juri@linkov.net>
Mon, 29 Oct 2018 22:57:09 +0000 (00:57 +0200)
committerJuri Linkov <juri@linkov.net>
Mon, 29 Oct 2018 22:57:09 +0000 (00:57 +0200)
and prev-buffers.  (Bug#32850)

lisp/window.el

index 27d7e42280f55d62214cd80ab196ba77c3d95c70..bcd4fa295904f5359d37465f9c07c2b972316b90 100644 (file)
@@ -5552,9 +5552,14 @@ specific buffers."
         (buffer (window-buffer window))
         (selected (eq window (selected-window)))
         (next-buffers (when (window-live-p window)
-                        (window-next-buffers window)))
+                        (delq nil (mapcar (lambda (buffer)
+                                             (and (buffer-live-p buffer) buffer))
+                                           (window-next-buffers window)))))
         (prev-buffers (when (window-live-p window)
-                        (window-prev-buffers window)))
+                        (delq nil (mapcar (lambda (entry)
+                                             (and (buffer-live-p (nth 0 entry))
+                                                  entry))
+                                           (window-prev-buffers window)))))
         (head
          `(,type
             ,@(unless (window-next-sibling window) `((last . t)))