/[emacs]/emacs/lisp/window.el
ViewVC logotype

Diff of /emacs/lisp/window.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.78 by gerd, Fri Sep 7 11:29:48 2001 UTC revision 1.79 by rms, Mon Nov 26 10:09:56 2001 UTC
# Line 127  Anything else means restrict to the sele Line 127  Anything else means restrict to the sele
127    (eq window (active-minibuffer-window)))    (eq window (active-minibuffer-window)))
128    
129  (defmacro save-selected-window (&rest body)  (defmacro save-selected-window (&rest body)
130    "Execute BODY, then select the window that was selected before BODY."    "Execute BODY, then select the window that was selected before BODY.
131    However, if that window has become dead, don't get an error,
132    just refrain from switching to it."
133    `(let ((save-selected-window-window (selected-window)))    `(let ((save-selected-window-window (selected-window)))
134       (unwind-protect       (unwind-protect
135           (progn ,@body)           (progn ,@body)
136         (select-window save-selected-window-window))))         (if (window-live-p save-selected-window-window)
137               (select-window save-selected-window-window)))))
138    
139  (defun count-windows (&optional minibuf)  (defun count-windows (&optional minibuf)
140     "Return the number of visible windows.     "Return the number of visible windows.

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26