Mercurial > emacs
comparison lisp/subr.el @ 83143:9fb10038ca55
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-353
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-354
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-355
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-356
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-183
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 31 May 2004 13:48:26 +0000 |
parents | 62cf3d6337a0 af9432138635 |
children | 2e868590c17b |
comparison
equal
deleted
inserted
replaced
83142:62cf3d6337a0 | 83143:9fb10038ca55 |
---|---|
1794 "Execute the forms in BODY with WINDOW as the selected window. | 1794 "Execute the forms in BODY with WINDOW as the selected window. |
1795 The value returned is the value of the last form in BODY. | 1795 The value returned is the value of the last form in BODY. |
1796 This does not alter the buffer list ordering. | 1796 This does not alter the buffer list ordering. |
1797 See also `with-temp-buffer'." | 1797 See also `with-temp-buffer'." |
1798 (declare (indent 1) (debug t)) | 1798 (declare (indent 1) (debug t)) |
1799 `(let ((save-selected-window-window (selected-window))) | 1799 ;; Most of this code is a copy of save-selected-window. |
1800 `(let ((save-selected-window-window (selected-window)) | |
1801 ;; It is necessary to save all of these, because calling | |
1802 ;; select-window changes frame-selected-window for whatever | |
1803 ;; frame that window is in. | |
1804 (save-selected-window-alist | |
1805 (mapcar (lambda (frame) (list frame (frame-selected-window frame))) | |
1806 (frame-list)))) | |
1800 (unwind-protect | 1807 (unwind-protect |
1801 (progn (select-window ,window 'norecord) | 1808 (progn (select-window ,window 'norecord) |
1802 ,@body) | 1809 ,@body) |
1810 (dolist (elt save-selected-window-alist) | |
1811 (and (frame-live-p (car elt)) | |
1812 (window-live-p (cadr elt)) | |
1813 (set-frame-selected-window (car elt) (cadr elt)))) | |
1803 (if (window-live-p save-selected-window-window) | 1814 (if (window-live-p save-selected-window-window) |
1804 (select-window save-selected-window-window 'norecord))))) | 1815 (select-window save-selected-window-window 'norecord))))) |
1805 | 1816 |
1806 (defmacro with-selected-frame (frame &rest body) | 1817 (defmacro with-selected-frame (frame &rest body) |
1807 "Execute the forms in BODY with FRAME as the selected frame. | 1818 "Execute the forms in BODY with FRAME as the selected frame. |