]> code.delx.au - gnu-emacs/blobdiff - lisp/scroll-bar.el
Provide generalized variables in core Elisp.
[gnu-emacs] / lisp / scroll-bar.el
index 058d83a97bcc3bfad89336af7db2c4fb13a3cd3a..c6c7d7ddb8d775a42dbbf5aa04b4825ce53682ee 100644 (file)
@@ -123,9 +123,10 @@ the mode if ARG is omitted or nil.
 
 This command applies to all frames that exist and frames to be
 created in the future."
-  :variable (eq (get-scroll-bar-mode)
-                (or previous-scroll-bar-mode
-                    default-frame-scroll-bars)))
+  :variable ((get-scroll-bar-mode)
+             . (lambda (v) (set-scroll-bar-mode
+                       (if v (or previous-scroll-bar-mode
+                                 default-frame-scroll-bars))))))
 
 (defun toggle-scroll-bar (arg)
   "Toggle whether or not the selected frame has vertical scroll bars.