Commit 9b9c9e3a authored by Martin Rudalics's avatar Martin Rudalics
Browse files

Improve cohabitation of pop-up-frames and second argument of display-buffer (bug#8865).

* window.el (display-buffer-normalize-specifiers-1): Respect
current value of pop-up-frames for most reasonable values of
second argument of display-buffer (Bug#8865).
parent 2b8c5660
2011-06-16 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-normalize-specifiers-1): Respect
current value of pop-up-frames for most reasonable values of
second argument of display-buffer (Bug#8865).
2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca> 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
* pcmpl-rpm.el (pcomplete/rpm): Minor simplification. * pcmpl-rpm.el (pcomplete/rpm): Minor simplification.
......
...@@ -3453,9 +3453,8 @@ specific buffers." ...@@ -3453,9 +3453,8 @@ specific buffers."
;; (bw-finetune wins) ;; (bw-finetune wins)
;; (message "Done in %d rounds" round) ;; (message "Done in %d rounds" round)
)) ))
;;; Displaying 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))
...@@ -4909,9 +4908,12 @@ BUFFER-OR-NAME and return that buffer." ...@@ -4909,9 +4908,12 @@ BUFFER-OR-NAME and return that buffer."
(defun display-buffer-normalize-specifiers-1 (specifiers) (defun display-buffer-normalize-specifiers-1 (specifiers)
"Subroutine of `display-buffer-normalize-specifiers'. "Subroutine of `display-buffer-normalize-specifiers'.
SPECIFIERS is the SPECIFIERS argument of `display-buffer'." SPECIFIERS is the SPECIFIERS argument of `display-buffer'."
(let (normalized) (let (normalized entry)
(cond (cond
((not specifiers)
nil)
((listp specifiers) ((listp specifiers)
;; If SPECIFIERS is a list, we assume it is a list of specifiers.
(dolist (specifier specifiers) (dolist (specifier specifiers)
(cond (cond
((consp specifier) ((consp specifier)
...@@ -4924,21 +4926,17 @@ SPECIFIERS is the SPECIFIERS argument of `display-buffer'." ...@@ -4924,21 +4926,17 @@ SPECIFIERS is the SPECIFIERS argument of `display-buffer'."
(dolist (item (cdr entry)) (dolist (item (cdr entry))
(setq normalized (cons item normalized))))))) (setq normalized (cons item normalized)))))))
;; Reverse list. ;; Reverse list.
(setq normalized (nreverse normalized))) (nreverse normalized))
;; The two cases below must come from the SPECIFIERS argument of ((and (not (eq specifiers 'other-window))
;; `display-buffer'. (setq entry (assq specifiers display-buffer-macro-specifiers)))
((eq specifiers 't) ;; A macro specifier.
;; Historically t means "other window". Eventually we should get (cdr entry))
;; rid of this. ((memq pop-up-frames '(nil unset))
(setq normalized ;; Pop up a new window.
(cdr (assq 'other-window display-buffer-macro-specifiers)) (cdr (assq 'other-window display-buffer-macro-specifiers)))
normalized)) (t
((symbolp specifiers) ;; Pop up a new frame.
;; We allow scalar specifiers in calls of `display-buffer'. (cdr (assq 'other-frame display-buffer-macro-specifiers))))))
(let ((entry (assq specifiers display-buffer-macro-specifiers)))
(when entry (setq normalized (cdr entry))))))
normalized))
(defun display-buffer-normalize-specifiers-2 (&optional buffer-or-name) (defun display-buffer-normalize-specifiers-2 (&optional buffer-or-name)
"Subroutine of `display-buffer-normalize-specifiers'. "Subroutine of `display-buffer-normalize-specifiers'.
......
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