changeset 43093:5b046c8a20a6

(save-selected-window): Move macro before first use.
author Andreas Schwab <schwab@suse.de>
date Sun, 03 Feb 2002 15:35:27 +0000
parents 958188ec5dc6
children 498ce4f8a77a
files lisp/window.el
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/window.el	Sun Feb 03 13:45:59 2002 +0000
+++ b/lisp/window.el	Sun Feb 03 15:35:27 2002 +0000
@@ -29,6 +29,16 @@
 
 ;;; Code:
 
+(defmacro save-selected-window (&rest body)
+  "Execute BODY, then select the window that was selected before BODY.
+However, if that window has become dead, don't get an error,
+just refrain from switching to it."
+  `(let ((save-selected-window-window (selected-window)))
+     (unwind-protect
+	 (progn ,@body)
+       (if (window-live-p save-selected-window-window)
+	   (select-window save-selected-window-window)))))
+
 (defun window-body-height (&optional window)
   "Return number of lines in window WINDOW for actual buffer text.
 This does not include the mode line (if any) or the header line (if any)."
@@ -136,16 +146,6 @@
 (defun minibuffer-window-active-p (window)
   "Return t if WINDOW (a minibuffer window) is now active."
   (eq window (active-minibuffer-window)))
-
-(defmacro save-selected-window (&rest body)
-  "Execute BODY, then select the window that was selected before BODY.
-However, if that window has become dead, don't get an error,
-just refrain from switching to it."
-  `(let ((save-selected-window-window (selected-window)))
-     (unwind-protect
-	 (progn ,@body)
-       (if (window-live-p save-selected-window-window)
-	   (select-window save-selected-window-window)))))
 
 (defun count-windows (&optional minibuf)
    "Return the number of visible windows.