]> code.delx.au - gnu-emacs/blobdiff - lisp/subr.el
Merged in changes from CVS trunk.
[gnu-emacs] / lisp / subr.el
index 50216bb75369faea3d3b5ea5cf165fcb8789a3ed..6df731bcf08905070881d2c16c1e2f10facb2785 100644 (file)
@@ -1600,7 +1600,8 @@ On other systems, this variable is normally always nil.")
 
 ;; 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 @@ See also `with-temp-buffer'."
   "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.