emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/window.el


From: Andreas Schwab
Subject: [Emacs-diffs] Changes to emacs/lisp/window.el
Date: Sun, 03 Feb 2002 10:35:27 -0500

Index: emacs/lisp/window.el
diff -c emacs/lisp/window.el:1.82 emacs/lisp/window.el:1.83
*** emacs/lisp/window.el:1.82   Mon Jan 21 03:55:32 2002
--- emacs/lisp/window.el        Sun Feb  3 10:35:27 2002
***************
*** 29,34 ****
--- 29,44 ----
  
  ;;; 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,151 ****
  (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.
--- 146,151 ----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]