aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-20 18:59:22 +0000
committerRichard M. Stallman1994-03-20 18:59:22 +0000
commite0de7bcbbb39456ff4cb315a7d02857751943a0c (patch)
treea4d8d1b7195f34feb8353d94cb6138a940522066
parent89851a09e750ea76fb654d084c03cb413934a6d5 (diff)
downloademacs-e0de7bcbbb39456ff4cb315a7d02857751943a0c.tar.gz
emacs-e0de7bcbbb39456ff4cb315a7d02857751943a0c.zip
(one-window-p): New argument all-frames.
-rw-r--r--lisp/subr.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 42105a44d56..368bf55cb6c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -53,15 +53,21 @@ BODY should be a list of lisp expressions."
53 53
54;;;; Window tree functions. 54;;;; Window tree functions.
55 55
56(defun one-window-p (&optional nomini) 56(defun one-window-p (&optional nomini all-frames)
57 "Returns non-nil if there is only one window. 57 "Returns non-nil if there is only one window.
58Optional arg NOMINI non-nil means don't count the minibuffer 58Optional arg NOMINI non-nil means don't count the minibuffer
59even if it is active." 59even if it is active.
60
61The optional arg ALL-FRAMES t means count windows on all frames.
62If it is `visible', count windows on all visible frames.
63ALL-FRAMES nil or omitted means count only the selected frame,
64plus the minibuffer it uses (which may be on another frame).
65If ALL-FRAMES is neither nil nor t, count only the selected frame."
60 (let ((base-window (selected-window))) 66 (let ((base-window (selected-window)))
61 (if (and nomini (eq base-window (minibuffer-window))) 67 (if (and nomini (eq base-window (minibuffer-window)))
62 (setq base-window (next-window base-window))) 68 (setq base-window (next-window base-window)))
63 (eq base-window 69 (eq base-window
64 (next-window base-window (if nomini 'arg))))) 70 (next-window base-window (if nomini 'arg) all-frames))))
65 71
66(defun walk-windows (proc &optional minibuf all-frames) 72(defun walk-windows (proc &optional minibuf all-frames)
67 "Cycle through all visible windows, calling PROC for each one. 73 "Cycle through all visible windows, calling PROC for each one.