1606 |
|
|
1607 |
;; This should probably be written in C (i.e., without using `walk-windows'). |
;; This should probably be written in C (i.e., without using `walk-windows'). |
1608 |
(defun get-buffer-window-list (buffer &optional minibuf frame) |
(defun get-buffer-window-list (buffer &optional minibuf frame) |
1609 |
"Return windows currently displaying BUFFER, or nil if none. |
"Return list of all windows displaying BUFFER, or nil if none. |
1610 |
|
BUFFER can be a buffer or a buffer name. |
1611 |
See `walk-windows' for the meaning of MINIBUF and FRAME." |
See `walk-windows' for the meaning of MINIBUF and FRAME." |
1612 |
(let ((buffer (if (bufferp buffer) buffer (get-buffer buffer))) windows) |
(let ((buffer (if (bufferp buffer) buffer (get-buffer buffer))) windows) |
1613 |
(walk-windows (function (lambda (window) |
(walk-windows (function (lambda (window) |
1805 |
"Execute the forms in BODY with WINDOW as the selected window. |
"Execute the forms in BODY with WINDOW as the selected window. |
1806 |
The value returned is the value of the last form in BODY. |
The value returned is the value of the last form in BODY. |
1807 |
This does not alter the buffer list ordering. |
This does not alter the buffer list ordering. |
1808 |
|
This function saves and restores the selected window, as well as |
1809 |
|
the selected window in each frame. If the previously selected |
1810 |
|
window of some frame is no longer live at the end of BODY, that |
1811 |
|
frame's selected window is left alone. If the selected window is |
1812 |
|
no longer live, then whatever window is selected at the end of |
1813 |
|
BODY remains selected. |
1814 |
See also `with-temp-buffer'." |
See also `with-temp-buffer'." |
1815 |
(declare (indent 1) (debug t)) |
(declare (indent 1) (debug t)) |
1816 |
;; Most of this code is a copy of save-selected-window. |
;; Most of this code is a copy of save-selected-window. |