HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Empty elements in EMACSLOADPATH now stand for the default
[bpt/emacs.git]
/
lisp
/
scroll-bar.el
diff --git
a/lisp/scroll-bar.el
b/lisp/scroll-bar.el
index
54f2ba7
..
7fb1791
100644
(file)
--- a/
lisp/scroll-bar.el
+++ b/
lisp/scroll-bar.el
@@
-1,6
+1,6
@@
;;; scroll-bar.el --- window system-independent scroll bar support
;;; scroll-bar.el --- window system-independent scroll bar support
-;; Copyright (C) 1993-1995, 1999-201
1
Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 1999-201
3
Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: hardware
;; Maintainer: FSF
;; Keywords: hardware
@@
-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.
@@
-81,7
+81,8
@@
SIDE must be the symbol `left' or `right'."
This is nil while loading `scroll-bar.el', and t afterward.")
(defun set-scroll-bar-mode (value)
This is nil while loading `scroll-bar.el', and t afterward.")
(defun set-scroll-bar-mode (value)
- "Set `scroll-bar-mode' to VALUE and put the new value into effect."
+ "Set the scroll bar mode to VALUE and put the new value into effect.
+See the `scroll-bar-mode' variable for possible values to use."
(if scroll-bar-mode
(setq previous-scroll-bar-mode scroll-bar-mode))
(if scroll-bar-mode
(setq previous-scroll-bar-mode scroll-bar-mode))
@@
-111,17
+112,22
@@
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
(define-minor-mode scroll-bar-mode
- "Toggle display of vertical scroll bars on all frames.
+ "Toggle vertical scroll bars on all frames (Scroll Bar mode).
+With a prefix argument ARG, enable Scroll Bar mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
This command applies to all frames that exist and frames to be
This command applies to all frames that exist and frames to be
-created in the future.
-With a numeric argument, if the argument is positive
-turn on scroll bars; otherwise turn off scroll bars."
- :variable (eq (get-scroll-bar-mode)
- (or previous-scroll-bar-mode
- default-frame-scroll-bars)))
+created in the future."
+ :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.