emacs-diffs
[Top][All Lists]
Advanced

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

master 9c0128f: In 'window--display-buffer' handle nil size values as in


From: Martin Rudalics
Subject: master 9c0128f: In 'window--display-buffer' handle nil size values as intended (Bug#51062)
Date: Thu, 14 Oct 2021 04:21:46 -0400 (EDT)

branch: master
commit 9c0128faf7d8de1a017e94595420a16a27321fc1
Author: Martin Rudalics <rudalics@gmx.at>
Commit: Martin Rudalics <rudalics@gmx.at>

    In 'window--display-buffer' handle nil size values as intended (Bug#51062)
    
    * lisp/window.el (window--display-buffer): Make sure
    that (window-height . nil), (window-width . nil)
    and (window-size . nil) action alist entries are processed
    as intended.
---
 lisp/window.el | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lisp/window.el b/lisp/window.el
index 1a5f2d4..20c662c 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7267,7 +7267,9 @@ Return WINDOW if BUFFER and WINDOW are live."
         ;; Adjust size of frame if asked for.  We probably should do
         ;; that only for a single window frame.
        (cond
-        ((not size))
+        ((not size)
+          (when window-size
+            (setq resize-temp-buffer-window-inhibit t)))
         ((consp size)
          (let ((width (car size))
                (height (cdr size))
@@ -7293,7 +7295,9 @@ Return WINDOW if BUFFER and WINDOW are live."
         ;;
         ;; Adjust width and/or height of window if asked for.
        (cond
-        ((not height))
+         ((not height)
+         (when window-height
+            (setq resize-temp-buffer-window-inhibit 'vertical)))
         ((numberp height)
          (let* ((new-height
                  (if (integerp height)
@@ -7311,7 +7315,9 @@ Return WINDOW if BUFFER and WINDOW are live."
           (setq resize-temp-buffer-window-inhibit 'vertical)))
        ;; Adjust width of window if asked for.
        (cond
-        ((not width))
+        ((not width)
+          (when window-width
+            (setq resize-temp-buffer-window-inhibit 'horizontal)))
         ((numberp width)
          (let* ((new-width
                  (if (integerp width)
@@ -7327,10 +7333,12 @@ Return WINDOW if BUFFER and WINDOW are live."
         ((functionp width)
          (ignore-errors (funcall width window))
           (setq resize-temp-buffer-window-inhibit 'horizontal)))
+
        ;; Preserve window size if asked for.
        (when (consp preserve-size)
          (window-preserve-size window t (car preserve-size))
          (window-preserve-size window nil (cdr preserve-size)))))
+
       ;; Assign any window parameters specified.
       (let ((parameters (cdr (assq 'window-parameters alist))))
         (dolist (parameter parameters)



reply via email to

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