comparison lisp/scroll-bar.el @ 49016:ac27fa84f239

* scroll-bar.el (toggle-scroll-bar, scroll-bar-mode): Have scroll bars correctly default to being on the right for Mac Carbon port by testing "mac-carbon" feature, not window-system.
author Steven Tamm <steventamm@mac.com>
date Thu, 02 Jan 2003 22:37:13 +0000
parents c70fd9638f43
children 1b58100e624c d7ddb3e565de
comparison
equal deleted inserted replaced
49015:c49640262de0 49016:ac27fa84f239
87 (list (cons 'vertical-scroll-bars scroll-bar-mode))) 87 (list (cons 'vertical-scroll-bars scroll-bar-mode)))
88 (setq frames (cdr frames)))))) 88 (setq frames (cdr frames))))))
89 89
90 (defcustom scroll-bar-mode 90 (defcustom scroll-bar-mode
91 (cond ((eq system-type 'windows-nt) 'right) 91 (cond ((eq system-type 'windows-nt) 'right)
92 ((eq window-system 'mac) 'right) 92 ((featurep 'mac-carbon) 'right)
93 (t 'left)) 93 (t 'left))
94 "*Specify whether to have vertical scroll bars, and on which side. 94 "*Specify whether to have vertical scroll bars, and on which side.
95 Possible values are nil (no scroll bars), `left' (scroll bars on left) 95 Possible values are nil (no scroll bars), `left' (scroll bars on left)
96 and `right' (scroll bars on right). 96 and `right' (scroll bars on right).
97 To set this variable in a Lisp program, use `set-scroll-bar-mode' 97 To set this variable in a Lisp program, use `set-scroll-bar-mode'
121 121
122 ;; Tweedle the variable according to the argument. 122 ;; Tweedle the variable according to the argument.
123 (set-scroll-bar-mode (if (null flag) (not scroll-bar-mode) 123 (set-scroll-bar-mode (if (null flag) (not scroll-bar-mode)
124 (and (or (not (numberp flag)) (>= flag 0)) 124 (and (or (not (numberp flag)) (>= flag 0))
125 (cond ((eq system-type 'windows-nt) 'right) 125 (cond ((eq system-type 'windows-nt) 'right)
126 ((eq window-system 'mac) 'right) 126 ((featurep 'mac-carbon) 'right)
127 (t 'left)))))) 127 (t 'left))))))
128 128
129 (defun toggle-scroll-bar (arg) 129 (defun toggle-scroll-bar (arg)
130 "Toggle whether or not the selected frame has vertical scroll bars. 130 "Toggle whether or not the selected frame has vertical scroll bars.
131 With arg, turn vertical scroll bars on if and only if arg is positive. 131 With arg, turn vertical scroll bars on if and only if arg is positive.
142 (selected-frame) 142 (selected-frame)
143 (list (cons 'vertical-scroll-bars 143 (list (cons 'vertical-scroll-bars
144 (if (> arg 0) 144 (if (> arg 0)
145 (or scroll-bar-mode 145 (or scroll-bar-mode
146 (cond ((eq system-type 'windows-nt) 'right) 146 (cond ((eq system-type 'windows-nt) 'right)
147 ((eq window-system 'mac) 'right) 147 ((featurep 'mac-carbon) 'right)
148 (t 'left)))))))) 148 (t 'left))))))))
149 149
150 (defun toggle-horizontal-scroll-bar (arg) 150 (defun toggle-horizontal-scroll-bar (arg)
151 "Toggle whether or not the selected frame has horizontal scroll bars. 151 "Toggle whether or not the selected frame has horizontal scroll bars.
152 With arg, turn horizontal scroll bars on if and only if arg is positive. 152 With arg, turn horizontal scroll bars on if and only if arg is positive.