diff lisp/subr.el @ 83178:a79c4db19c4f

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-450 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-451 Update from CVS: lisp/subr.el (get-buffer-window-list): Doc fix. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-452 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-453 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-218
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 13 Jul 2004 15:45:15 +0000
parents 8e09aff3715a 78189fca7611
children 4e92102a0172
line wrap: on
line diff
--- a/lisp/subr.el	Sun Jul 11 03:44:18 2004 +0000
+++ b/lisp/subr.el	Tue Jul 13 15:45:15 2004 +0000
@@ -1600,7 +1600,8 @@
 
 ;; This should probably be written in C (i.e., without using `walk-windows').
 (defun get-buffer-window-list (buffer &optional minibuf frame)
-  "Return windows currently displaying BUFFER, or nil if none.
+  "Return list of all windows displaying BUFFER, or nil if none.
+BUFFER can be a buffer or a buffer name.
 See `walk-windows' for the meaning of MINIBUF and FRAME."
   (let ((buffer (if (bufferp buffer) buffer (get-buffer buffer))) windows)
     (walk-windows (function (lambda (window)
@@ -1798,6 +1799,12 @@
   "Execute the forms in BODY with WINDOW as the selected window.
 The value returned is the value of the last form in BODY.
 This does not alter the buffer list ordering.
+This function saves and restores the selected window, as well as
+the selected window in each frame.  If the previously selected
+window of some frame is no longer live at the end of BODY, that
+frame's selected window is left alone.  If the selected window is
+no longer live, then whatever window is selected at the end of
+BODY remains selected.
 See also `with-temp-buffer'."
   (declare (indent 1) (debug t))
   ;; Most of this code is a copy of save-selected-window.