mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 10:50:49 -08:00
(display-buffer): When a buffer is displayed in the
selected and some other window, and not-this-window is non-nil, try to return that other window instead of popping up a new frame. (Bug#30)
This commit is contained in:
parent
c0eb6ac0b1
commit
e331bbf3be
2 changed files with 17 additions and 4 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
2009-01-04 Martin Rudalics <rudalics@gmx.at>
|
||||||
|
|
||||||
|
* window.el (display-buffer): When a buffer is displayed in the
|
||||||
|
selected and some other window, and not-this-window is non-nil,
|
||||||
|
try to return that other window instead of popping up a new
|
||||||
|
frame. (Bug#30)
|
||||||
|
|
||||||
2009-01-04 Chong Yidong <cyd@stupidchicken.com>
|
2009-01-04 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
* simple.el (visual-line-mode-map): Remove M-[ and M-] bindings.
|
* simple.el (visual-line-mode-map): Remove M-[ and M-] bindings.
|
||||||
|
|
|
||||||
|
|
@ -1006,10 +1006,16 @@ consider all visible or iconified frames."
|
||||||
(not (last-nonminibuffer-frame)))
|
(not (last-nonminibuffer-frame)))
|
||||||
0)
|
0)
|
||||||
(last-nonminibuffer-frame))))
|
(last-nonminibuffer-frame))))
|
||||||
(and (setq window-to-use (get-buffer-window buffer frames))
|
(setq window-to-use
|
||||||
(or can-use-selected-window
|
(catch 'found
|
||||||
(not (eq (selected-window) window-to-use)))))
|
;; Search all visible and iconified frames for a window
|
||||||
;; If the buffer is already displayed in some window use that.
|
;; displaying BUFFER. Return the selected window only
|
||||||
|
;; if can-use-selected-window says we may do so.
|
||||||
|
(dolist (window (get-buffer-window-list buffer 'nomini 0))
|
||||||
|
(when (or can-use-selected-window
|
||||||
|
(not (eq (selected-window) window)))
|
||||||
|
(throw 'found window))))))
|
||||||
|
;; The buffer is already displayed in some window; use that.
|
||||||
(window--display-buffer-1 window-to-use))
|
(window--display-buffer-1 window-to-use))
|
||||||
((and special-display-function
|
((and special-display-function
|
||||||
;; `special-display-p' returns either t or a list of frame
|
;; `special-display-p' returns either t or a list of frame
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue