]> code.delx.au - gnu-emacs/commitdiff
*** empty log message ***
authorJim Blandy <jimb@redhat.com>
Sat, 12 Sep 1992 01:20:58 +0000 (01:20 +0000)
committerJim Blandy <jimb@redhat.com>
Sat, 12 Sep 1992 01:20:58 +0000 (01:20 +0000)
lisp/term/x-win.el

index 68923a0b8dbad15aa1795b795648417d224e7a5b..5bac6d6769e441b66396f45341d3f555a4a23284 100644 (file)
@@ -415,6 +415,25 @@ This returns ARGS with the arguments that have been processed removed."
           (setq defined-colors (cons this-color defined-colors))))
     defined-colors))
 \f
+(defvar scroll-bar-mode nil)
+
+;;; ??? x-create-screen needs to be changed to use scroll-bar-mode
+;;; to decide (by default) whether to make a scroll bar.
+(defun scroll-bar-mode (flag)
+  "Toggle display of vertical scroll bars on each frame.
+This command applies to all frames that exist and frames to be
+created in the future.
+With a numeric argument, if the argument is negative,
+turn off scroll bars; otherwise, turn on scroll bars."
+  (interactive "P")
+  (setq scroll-bar-mode (if (null flag) (not scroll-bar-mode)
+                         (or (not (numberp flag)) (>= flag 0))))
+  (let ((frames (frame-list)))
+    (while frames
+      (modify-frame-parameters (car frames)
+                              (list (cons 'vertical-scrollbar scroll-bar-mode)))
+      (setq frames (cdr frames)))))
+\f
 ;;;; Function keys
 
 ;;; Give some common function keys reasonable definitions.