]> code.delx.au - gnu-emacs/blobdiff - lisp/scroll-bar.el
src/*.c: Silence a few warnings about unused vars and functions.
[gnu-emacs] / lisp / scroll-bar.el
index 058d83a97bcc3bfad89336af7db2c4fb13a3cd3a..2990e8e5ffacd82e8f9b7f38aaa7393073e950e3 100644 (file)
@@ -1,8 +1,8 @@
 ;;; scroll-bar.el --- window system-independent scroll bar support
 
 ;;; scroll-bar.el --- window system-independent scroll bar support
 
-;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 1999-2014 Free Software Foundation, Inc.
 
 
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: hardware
 ;; Package: emacs
 
 ;; Keywords: hardware
 ;; Package: emacs
 
@@ -29,7 +29,7 @@
 ;;; Code:
 
 (require 'mouse)
 ;;; Code:
 
 (require 'mouse)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 \f
 ;;;; Utilities.
 
 \f
 ;;;; Utilities.
@@ -112,8 +112,9 @@ Setting the variable with a customization buffer also takes effect."
 ;; If it is set again, that is for real.
 (setq scroll-bar-mode-explicit t)
 
 ;; If it is set again, that is for real.
 (setq scroll-bar-mode-explicit t)
 
-(defun get-scroll-bar-mode () scroll-bar-mode)
-(defsetf get-scroll-bar-mode set-scroll-bar-mode)
+(defun get-scroll-bar-mode ()
+  (declare (gv-setter set-scroll-bar-mode))
+  scroll-bar-mode)
 
 (define-minor-mode scroll-bar-mode
   "Toggle vertical scroll bars on all frames (Scroll Bar mode).
 
 (define-minor-mode scroll-bar-mode
   "Toggle vertical scroll bars on all frames (Scroll Bar mode).
@@ -123,9 +124,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."
 
 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.
 
 (defun toggle-scroll-bar (arg)
   "Toggle whether or not the selected frame has vertical scroll bars.