From: Kim F. Storm Date: Wed, 24 Sep 2003 22:54:55 +0000 (+0000) Subject: (frame-current-scroll-bars): New defun. X-Git-Tag: ttn-vms-21-2-B4~8742 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=56cfea72a3892bd7042e286b1784e56c404b2bb7;p=emacs.git (frame-current-scroll-bars): New defun. --- 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)