/[emacs]/emacs/lisp/scroll-bar.el
ViewVC logotype

Diff of /emacs/lisp/scroll-bar.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41 by pj, Sun Jan 20 15:44:52 2002 UTC revision 1.41.4.1 by miles, Fri Apr 4 06:20:10 2003 UTC
# Line 1  Line 1 
1  ;;; scroll-bar.el --- window system-independent scroll bar support  ;;; scroll-bar.el --- window system-independent scroll bar support
2    
3  ;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001  ;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001, 2003
4  ;;  Free Software Foundation, Inc.  ;;  Free Software Foundation, Inc.
5    
6  ;; Maintainer: FSF  ;; Maintainer: FSF
# Line 88  This is nil while loading `scroll-bar.el Line 88  This is nil while loading `scroll-bar.el
88          (setq frames (cdr frames))))))          (setq frames (cdr frames))))))
89    
90  (defcustom scroll-bar-mode  (defcustom scroll-bar-mode
91    (if (eq system-type 'windows-nt) 'right 'left)    (cond ((eq system-type 'windows-nt) 'right)
92            ((featurep 'mac-carbon) 'right)
93            (t 'left))
94    "*Specify whether to have vertical scroll bars, and on which side.    "*Specify whether to have vertical scroll bars, and on which side.
95  Possible values are nil (no scroll bars), `left' (scroll bars on left)  Possible values are nil (no scroll bars), `left' (scroll bars on left)
96  and `right' (scroll bars on right).  and `right' (scroll bars on right).
97  To set this variable in a Lisp program, use `set-scroll-bar-mode'  To set this variable in a Lisp program, use `set-scroll-bar-mode'
98  to make it take real effect.  to make it take real effect.
99  Setting the variable with a customization buffer also takes effect."  Setting the variable with a customization buffer also takes effect."
100    :type '(choice (const :tag "none (nil)")    :type '(choice (const :tag "none (nil)" nil)
101                   (const left)                   (const left)
102                   (const right))                   (const right))
103    :group 'frames    :group 'frames
104      ;; The default value for :initialize would try to use :set
105      ;; when processing the file in cus-dep.el.
106      :initialize 'custom-initialize-default
107    :set 'set-scroll-bar-mode-1)    :set 'set-scroll-bar-mode-1)
108    
109  ;; We just set scroll-bar-mode, but that was the default.  ;; We just set scroll-bar-mode, but that was the default.
# Line 117  turn off scroll bars; otherwise, turn on Line 122  turn off scroll bars; otherwise, turn on
122    ;; Tweedle the variable according to the argument.    ;; Tweedle the variable according to the argument.
123    (set-scroll-bar-mode (if (null flag) (not scroll-bar-mode)    (set-scroll-bar-mode (if (null flag) (not scroll-bar-mode)
124                           (and (or (not (numberp flag)) (>= flag 0))                           (and (or (not (numberp flag)) (>= flag 0))
125                                (if (eq system-type 'windows-nt) 'right 'left)))))                                (cond ((eq system-type 'windows-nt) 'right)
126                                        ((featurep 'mac-carbon) 'right)
127                                        (t 'left))))))
128    
129  (defun toggle-scroll-bar (arg)  (defun toggle-scroll-bar (arg)
130    "Toggle whether or not the selected frame has vertical scroll bars.    "Toggle whether or not the selected frame has vertical scroll bars.
# Line 136  when they are turned on; if it is nil, t Line 143  when they are turned on; if it is nil, t
143     (list (cons 'vertical-scroll-bars     (list (cons 'vertical-scroll-bars
144                 (if (> arg 0)                 (if (> arg 0)
145                     (or scroll-bar-mode                     (or scroll-bar-mode
146                         (if (eq system-type 'windows-nt) 'right 'left)))))))                         (cond ((eq system-type 'windows-nt) 'right)
147                                 ((featurep 'mac-carbon) 'right)
148                                 (t 'left))))))))
149    
150  (defun toggle-horizontal-scroll-bar (arg)  (defun toggle-horizontal-scroll-bar (arg)
151    "Toggle whether or not the selected frame has horizontal scroll bars.    "Toggle whether or not the selected frame has horizontal scroll bars.

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.41.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26