]> git.eshelyaron.com Git - emacs.git/commitdiff
(frame-current-scroll-bars): New defun.
authorKim F. Storm <storm@cua.dk>
Wed, 24 Sep 2003 22:54:55 +0000 (22:54 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 24 Sep 2003 22:54:55 +0000 (22:54 +0000)
lisp/frame.el

index 7cef0f3e9778f0a7ba9d4265285a8f058916ca28..367f40d6f8e9865b6451e94ae084b2a07f2cb39f 100644 (file)
@@ -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)))
 \f
 ;;;; Frame/display capabilities.
 (defun display-mouse-p (&optional display)