;;; window.el --- GNU Emacs window commands aside from those written in C
;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002,
-;; 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
BUFFER in any way it likes. All this is done by the function
found in `special-display-function'.
-If the specified frame parameters include (same-buffer . t), the
-buffer is displayed in the currently selected window. Otherwise, if
-they include (same-frame . t), the buffer is displayed in a new window
-in the currently selected frame.
+If the specified frame parameters include (same-window . t), the
+buffer is displayed in the currently selected window. Otherwise,
+if they include (same-frame . t), the buffer is displayed in a
+new window in the currently selected frame.
If this variable appears \"not to work\", because you add a name to it
but that buffer still appears in the selected window, look at the
the buffer in any way it likes. All this is done by the function
found in `special-display-function'.
-If the specified frame parameters include (same-buffer . t), the
+If the specified frame parameters include (same-window . t), the
buffer is displayed in the currently selected window. Otherwise,
if they include (same-frame . t), the buffer is displayed in a
new window in the currently selected frame.
using `special-display-frame-alist' to specify the frame
parameters.
-But if the buffer specific data includes (same-buffer . t) then
-the buffer is displayed in the current selected window.
-Otherwise if it includes (same-frame . t) then the buffer is
+But if the buffer specific data includes (same-window . t) then
+the buffer is displayed in the currently selected window.
+Otherwise, if it includes (same-frame . t) then the buffer is
displayed in a new window in the currently selected frame.
A buffer is special if it is listed in
(last-nonminibuffer-frame))))
(setq window-to-use
(catch 'found
- ;; Search all visible and iconified frames for a window
- ;; 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))
+ ;; Search frames for a window displaying BUFFER. Return
+ ;; the selected window only if we are allowed to do so.
+ (dolist (window (get-buffer-window-list buffer 'nomini frames))
(when (or can-use-selected-window
(not (eq (selected-window) window)))
(throw 'found window))))))