emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0c6e9a0: * lisp/window.el (window--state-get-1): Ch


From: Juri Linkov
Subject: [Emacs-diffs] master 0c6e9a0: * lisp/window.el (window--state-get-1): Check buffer-live-p in next-buffers
Date: Mon, 29 Oct 2018 18:57:17 -0400 (EDT)

branch: master
commit 0c6e9a00046ffb1421563b06030a6ce3025ce1fa
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/window.el (window--state-get-1): Check buffer-live-p in next-buffers
    
    and prev-buffers.  (Bug#32850)
---
 lisp/window.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/window.el b/lisp/window.el
index 27d7e42..bcd4fa2 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]