aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2011-06-18 16:23:14 +0200
committerMartin Rudalics2011-06-18 16:23:14 +0200
commitbe3fb2b8752f83e91624e6427db159846abb998b (patch)
treed2032ac2216153d5cc02a7a097d968168ad2447a
parent1c6d8c761fd19c6a277db1a183e65e16d4094421 (diff)
downloademacs-be3fb2b8752f83e91624e6427db159846abb998b.tar.gz
emacs-be3fb2b8752f83e91624e6427db159846abb998b.zip
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.
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/window.el21
2 files changed, 28 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c83140774ae..afbca4c3118 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12011-06-18 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (display-buffer-default-specifiers): Remove
4 pop-up-frame. Add pop-up-window-min-height,
5 pop-up-window-min-width, and another reuse-window specifier
6 (Bug#8882). Reported by Dan Nicolaescu <dann@gnu.org>.
7 (display-buffer-normalize-specifiers-2): Handle
8 split-height-threshold and split-width-threshold also when
9 pop-up-windows is unset. Add a reuse-window specifier for the
10 case popping up a new window fails.
11 (special-display-popup-frame): Remove double quoting.
12
12011-06-17 Stefan Monnier <monnier@iro.umontreal.ca> 132011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 14
3 * shell.el (shell-completion-vars): Set pcomplete-termination-string 15 * shell.el (shell-completion-vars): Set pcomplete-termination-string
diff --git a/lisp/window.el b/lisp/window.el
index a4baf99d956..67a80a6a2ec 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3480,10 +3480,13 @@ specific buffers."
3480(defconst display-buffer-default-specifiers 3480(defconst display-buffer-default-specifiers
3481 '((reuse-window nil same visible) 3481 '((reuse-window nil same visible)
3482 (pop-up-window (largest . nil) (lru . nil)) 3482 (pop-up-window (largest . nil) (lru . nil))
3483 (pop-up-frame) 3483 (pop-up-window-min-height . 40)
3484 (pop-up-window-min-width . 80)
3485 (reuse-window other nil nil)
3484 (pop-up-frame-alist 3486 (pop-up-frame-alist
3485 (height . 24) (width . 80) (unsplittable . t)) 3487 (height . 24) (width . 80) (unsplittable . t))
3486 (reuse-window nil other visible) 3488 (reuse-window nil other visible)
3489 (reuse-window nil nil t)
3487 (reuse-window-even-sizes . t)) 3490 (reuse-window-even-sizes . t))
3488 "Buffer display default specifiers. 3491 "Buffer display default specifiers.
3489The value specified here is used when no other specifiers have 3492The value specified here is used when no other specifiers have
@@ -5045,15 +5048,23 @@ options."
5045 (min-width (if (numberp split-width-threshold) 5048 (min-width (if (numberp split-width-threshold)
5046 (/ split-width-threshold 2) 5049 (/ split-width-threshold 2)
5047 1.0))) 5050 1.0)))
5048 (when pop-up-window 5051 ;; Create an entry only if a default value was changed.
5049 ;; `split-height-threshold' 5052 (when (or pop-up-window
5053 (not (equal split-height-threshold 80))
5054 (not (equal split-width-threshold 160)))
5055 ;; `reuse-window' (needed as fallback when popping up the new
5056 ;; window fails).
5050 (setq specifiers 5057 (setq specifiers
5051 (cons (cons 'pop-up-window-min-height min-height) 5058 (cons (list 'reuse-window 'other nil nil)
5052 specifiers)) 5059 specifiers))
5053 ;; `split-width-threshold' 5060 ;; `split-width-threshold'
5054 (setq specifiers 5061 (setq specifiers
5055 (cons (cons 'pop-up-window-min-width min-width) 5062 (cons (cons 'pop-up-window-min-width min-width)
5056 specifiers)) 5063 specifiers))
5064 ;; `split-height-threshold'
5065 (setq specifiers
5066 (cons (cons 'pop-up-window-min-height min-height)
5067 specifiers))
5057 ;; `pop-up-window' 5068 ;; `pop-up-window'
5058 (setq specifiers 5069 (setq specifiers
5059 (cons (list 'pop-up-window 5070 (cons (list 'pop-up-window
@@ -5663,7 +5674,7 @@ and (cdr ARGS) as second."
5663 ;; Reuse the current window if the user requested it. 5674 ;; Reuse the current window if the user requested it.
5664 (when (cdr (assq 'same-window args)) 5675 (when (cdr (assq 'same-window args))
5665 (display-buffer-reuse-window 5676 (display-buffer-reuse-window
5666 buffer '(same nil nil) '((reuse-dedicated . 'weak)))) 5677 buffer '(same nil nil) '((reuse-dedicated . weak))))
5667 ;; Stay on the same frame if requested. 5678 ;; Stay on the same frame if requested.
5668 (when (or (cdr (assq 'same-frame args)) 5679 (when (or (cdr (assq 'same-frame args))
5669 (cdr (assq 'same-window args))) 5680 (cdr (assq 'same-window args)))