aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2003-09-24 22:55:42 +0000
committerKim F. Storm2003-09-24 22:55:42 +0000
commit22f9c48c8299d370be8b504525f096a6ef321f46 (patch)
treebf36515a1529c8577af179a6099029c1a2c7b096
parent56cfea72a3892bd7042e286b1784e56c404b2bb7 (diff)
downloademacs-22f9c48c8299d370be8b504525f096a6ef321f46.tar.gz
emacs-22f9c48c8299d370be8b504525f096a6ef321f46.zip
(window-current-scroll-bars): New defun.
-rw-r--r--lisp/window.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 2cfc254b220..c4ae59e148f 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -75,6 +75,23 @@ If ALL-FRAMES is neither nil nor t, count only the selected frame."
75 (eq base-window 75 (eq base-window
76 (next-window base-window (if nomini 'arg) all-frames)))) 76 (next-window base-window (if nomini 'arg) all-frames))))
77 77
78(defun window-current-scroll-bars (&optional window)
79 "Return the current scroll-bar settings in window WINDOW.
80Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the
81current location of the vertical scroll-bars (left, right, or nil),
82and HORISONTAL specifies the current location of the horisontal scroll
83bars (top, bottom, or nil)."
84 (let ((vert (nth 2 (window-scroll-bars window)))
85 (hor nil))
86 (when (or (eq vert t) (eq hor t))
87 (let ((fcsb (frame-current-scroll-bars
88 (window-frame (or window (selected-window))))))
89 (if (eq vert t)
90 (setq vert (car fcsb)))
91 (if (eq hor t)
92 (setq hor (cdr fcsb)))))
93 (cons vert hor)))
94
78(defun walk-windows (proc &optional minibuf all-frames) 95(defun walk-windows (proc &optional minibuf all-frames)
79 "Cycle through all visible windows, calling PROC for each one. 96 "Cycle through all visible windows, calling PROC for each one.
80PROC is called with a window as argument. 97PROC is called with a window as argument.