Comment (add Author:, based on authors.el).
[bpt/emacs.git] / lisp / window.el
index b43eee2..fc76ea9 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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
@@ -590,10 +590,10 @@ the first argument, followed by the OTHER-ARGS--it can display
 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
@@ -629,7 +629,7 @@ the first argument, followed by the OTHER-ARGS--it can display
 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.
@@ -660,9 +660,9 @@ The default value normally makes a separate frame for the buffer,
 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
@@ -1008,10 +1008,9 @@ consider all visible or iconified frames."
                        (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))))))