aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-03-29 07:14:38 +0000
committerRichard M. Stallman1995-03-29 07:14:38 +0000
commit0d624ea45aff9ab15445f2bc6d79445262d31205 (patch)
tree4dc09d4628ba2e2f6b94a3708270e843fb7cba60
parent9fa195a2cc26639042156cb58016e3b4684756db (diff)
downloademacs-0d624ea45aff9ab15445f2bc6d79445262d31205.tar.gz
emacs-0d624ea45aff9ab15445f2bc6d79445262d31205.zip
(minibuffer-window-active-p): Use active-minibuffer-window.
-rw-r--r--lisp/window.el12
1 files changed, 1 insertions, 11 deletions
diff --git a/lisp/window.el b/lisp/window.el
index d760b28830d..cd2e5c69425 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -74,17 +74,7 @@ Anything else means restrict to WINDOW's frame."
74 74
75(defun minibuffer-window-active-p (window) 75(defun minibuffer-window-active-p (window)
76 "Return t if WINDOW (a minibuffer window) is now active." 76 "Return t if WINDOW (a minibuffer window) is now active."
77 ;; nil nil means include WINDOW's frame 77 (eq window (active-minibuffer-window)))
78 ;; and other frames using WINDOW as minibuffer,
79 ;; and include minibuffer if active.
80 (let ((prev (previous-window window nil nil)))
81 ;; If PREV equals WINDOW, WINDOW must be on a minibuffer-only frame
82 ;; and it's not currently being used. So return nil.
83 (and (not (eq window prev))
84 (let ((should-be-same (next-window prev nil nil)))
85 ;; If next-window doesn't reverse previous-window,
86 ;; WINDOW must be outside the cycle specified by nil nil.
87 (eq should-be-same window)))))
88 78
89(defun count-windows (&optional minibuf) 79(defun count-windows (&optional minibuf)
90 "Returns the number of visible windows. 80 "Returns the number of visible windows.