Commit be3fb2b8 authored by Martin Rudalics's avatar Martin Rudalics
Browse files

Additional fixes in handling of buffer display specifiers.

* window.el (display-buffer-default-specifiers): Remove
pop-up-frame.  Add pop-up-window-min-height,
pop-up-window-min-width, and another reuse-window specifier
(Bug#8882).  Reported by Dan Nicolaescu <dann@gnu.org>.
(display-buffer-normalize-specifiers-2): Handle
split-height-threshold and split-width-threshold also when
pop-up-windows is unset.  Add a reuse-window specifier for the
case popping up a new window fails.
(special-display-popup-frame): Remove double quoting.
parent 1c6d8c76
2011-06-18 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-default-specifiers): Remove
pop-up-frame. Add pop-up-window-min-height,
pop-up-window-min-width, and another reuse-window specifier
(Bug#8882). Reported by Dan Nicolaescu <dann@gnu.org>.
(display-buffer-normalize-specifiers-2): Handle
split-height-threshold and split-width-threshold also when
pop-up-windows is unset. Add a reuse-window specifier for the
case popping up a new window fails.
(special-display-popup-frame): Remove double quoting.
2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca> 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
* shell.el (shell-completion-vars): Set pcomplete-termination-string * shell.el (shell-completion-vars): Set pcomplete-termination-string
......
...@@ -3480,10 +3480,13 @@ specific buffers." ...@@ -3480,10 +3480,13 @@ specific buffers."
(defconst display-buffer-default-specifiers (defconst display-buffer-default-specifiers
'((reuse-window nil same visible) '((reuse-window nil same visible)
(pop-up-window (largest . nil) (lru . nil)) (pop-up-window (largest . nil) (lru . nil))
(pop-up-frame) (pop-up-window-min-height . 40)
(pop-up-window-min-width . 80)
(reuse-window other nil nil)
(pop-up-frame-alist (pop-up-frame-alist
(height . 24) (width . 80) (unsplittable . t)) (height . 24) (width . 80) (unsplittable . t))
(reuse-window nil other visible) (reuse-window nil other visible)
(reuse-window nil nil t)
(reuse-window-even-sizes . t)) (reuse-window-even-sizes . t))
"Buffer display default specifiers. "Buffer display default specifiers.
The value specified here is used when no other specifiers have The value specified here is used when no other specifiers have
...@@ -5045,15 +5048,23 @@ options." ...@@ -5045,15 +5048,23 @@ options."
(min-width (if (numberp split-width-threshold) (min-width (if (numberp split-width-threshold)
(/ split-width-threshold 2) (/ split-width-threshold 2)
1.0))) 1.0)))
(when pop-up-window ;; Create an entry only if a default value was changed.
;; `split-height-threshold' (when (or pop-up-window
(not (equal split-height-threshold 80))
(not (equal split-width-threshold 160)))
;; `reuse-window' (needed as fallback when popping up the new
;; window fails).
(setq specifiers (setq specifiers
(cons (cons 'pop-up-window-min-height min-height) (cons (list 'reuse-window 'other nil nil)
specifiers)) specifiers))
;; `split-width-threshold' ;; `split-width-threshold'
(setq specifiers (setq specifiers
(cons (cons 'pop-up-window-min-width min-width) (cons (cons 'pop-up-window-min-width min-width)
specifiers)) specifiers))
;; `split-height-threshold'
(setq specifiers
(cons (cons 'pop-up-window-min-height min-height)
specifiers))
;; `pop-up-window' ;; `pop-up-window'
(setq specifiers (setq specifiers
(cons (list 'pop-up-window (cons (list 'pop-up-window
...@@ -5663,7 +5674,7 @@ and (cdr ARGS) as second." ...@@ -5663,7 +5674,7 @@ and (cdr ARGS) as second."
;; Reuse the current window if the user requested it. ;; Reuse the current window if the user requested it.
(when (cdr (assq 'same-window args)) (when (cdr (assq 'same-window args))
(display-buffer-reuse-window (display-buffer-reuse-window
buffer '(same nil nil) '((reuse-dedicated . 'weak)))) buffer '(same nil nil) '((reuse-dedicated . weak))))
;; Stay on the same frame if requested. ;; Stay on the same frame if requested.
(when (or (cdr (assq 'same-frame args)) (when (or (cdr (assq 'same-frame args))
(cdr (assq 'same-window args))) (cdr (assq 'same-window args)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment