Mercurial > emacs
changeset 55812:093305d9b188
(with-selected-window): Only save/restore the selectd window.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 28 May 2004 22:33:35 +0000 |
parents | d8ee27fc17e9 |
children | 9af433cd3820 |
files | lisp/subr.el |
diffstat | 1 files changed, 1 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/subr.el Fri May 28 22:28:09 2004 +0000 +++ b/lisp/subr.el Fri May 28 22:33:35 2004 +0000 @@ -1796,20 +1796,11 @@ This does not alter the buffer list ordering. See also `with-temp-buffer'." (declare (indent 1) (debug t)) - ;; Most of this code is a copy of save-selected-window. - `(let ((save-selected-window-window (selected-window)) - (save-selected-window-alist - (mapcar (lambda (frame) (list frame (frame-selected-window frame))) - (frame-list)))) + `(let ((save-selected-window-window (selected-window))) (unwind-protect (progn (select-window ,window 'norecord) ,@body) - (dolist (elt save-selected-window-alist) - (and (frame-live-p (car elt)) - (window-live-p (cadr elt)) - (set-frame-selected-window (car elt) (cadr elt)))) (if (window-live-p save-selected-window-window) - ;; This is where the code differs from save-selected-window. (select-window save-selected-window-window 'norecord))))) (defmacro with-temp-file (file &rest body)