summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2003-09-24 22:54:55 +0000
committerKim F. Storm <storm@cua.dk>2003-09-24 22:54:55 +0000
commit56cfea72a3892bd7042e286b1784e56c404b2bb7 (patch)
tree1c420b80099c941584af8f25c3f11953e2856b8e /lisp/frame.el
parent31572e292e15d45f81792e189a0d192cafe2aa08 (diff)
downloademacs-56cfea72a3892bd7042e286b1784e56c404b2bb7.tar.gz
(frame-current-scroll-bars): New defun.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 7cef0f3e977..367f40d6f8e 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -942,6 +942,18 @@ one frame, otherwise the name is displayed on the frame's caption bar."
(interactive "sFrame name: ")
(modify-frame-parameters (selected-frame)
(list (cons 'name name))))
+
+(defun frame-current-scroll-bars (&optional frame)
+ "Return the current scroll-bar settings in frame FRAME.
+Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the
+current location of the vertical scroll-bars (left, right, or nil),
+and HORISONTAL specifies the current location of the horisontal scroll
+bars (top, bottom, or nil)."
+ (let ((vert (frame-parameter frame 'vertical-scroll-bars))
+ (hor nil))
+ (unless (memq vert '(left right nil))
+ (setq vert default-frame-scroll-bars))
+ (cons vert hor)))
;;;; Frame/display capabilities.
(defun display-mouse-p (&optional display)