Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 360 lines (312 sloc) 12.79 kb
2521c4c paveljanik Some fixes to follow coding conventions in files maintained by FSF.
paveljanik authored
1 ;;; scroll-bar.el --- window system-independent scroll bar support
ff71783 * scrollbar.el: New file.
Jim Blandy authored
2
f2c1228 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey authored
3 ;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
00f33a5 Glenn Morris Add 2009 to copyright years.
rgmorris authored
4 ;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
ff71783 * scrollbar.el: New file.
Jim Blandy authored
5
6 ;; Maintainer: FSF
7 ;; Keywords: hardware
8
4a414aa Update FSF's address.
Erik Naggum authored
9 ;; This file is part of GNU Emacs.
ff71783 * scrollbar.el: New file.
Jim Blandy authored
10
ccfbfbf Glenn Morris Switch to recommended form of GPLv3 permissions notice.
rgmorris authored
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
4a414aa Update FSF's address.
Erik Naggum authored
12 ;; it under the terms of the GNU General Public License as published by
ccfbfbf Glenn Morris Switch to recommended form of GPLv3 permissions notice.
rgmorris authored
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
ff71783 * scrollbar.el: New file.
Jim Blandy authored
15
4a414aa Update FSF's address.
Erik Naggum authored
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
ff71783 * scrollbar.el: New file.
Jim Blandy authored
20
4a414aa Update FSF's address.
Erik Naggum authored
21 ;; You should have received a copy of the GNU General Public License
ccfbfbf Glenn Morris Switch to recommended form of GPLv3 permissions notice.
rgmorris authored
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
dfbf9e3 Add standard library headers.
Eric S. Raymond authored
23
fc403f4 Added or corrected Commentary headers
Eric S. Raymond authored
24 ;;; Commentary:
25
26 ;; Window-system-independent bindings of mouse clicks on the scroll bar.
27 ;; Presently emulates the scroll-bar behavior of xterm.
4a414aa Update FSF's address.
Erik Naggum authored
28
fc403f4 Added or corrected Commentary headers
Eric S. Raymond authored
29 ;;; Code:
30
5a041ab JimB's changes since January 18th
Jim Blandy authored
31 (require 'mouse)
32
ff71783 * scrollbar.el: New file.
Jim Blandy authored
33
34 ;;;; Utilities.
35
0a9329c Corg-kun (scroll-bar-event-ratio): New function.
Corg-kun authored
36 (defun scroll-bar-event-ratio (event)
37 "Given a scroll bar event EVENT, return the scroll bar position as a ratio.
38 The value is a cons cell (PORTION . WHOLE) containing two integers
39 whose ratio gives the event's vertical position in the scroll bar, with 0
40 referring to the top and 1 to the bottom."
41 (nth 2 event))
42
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
43 (defun scroll-bar-scale (num-denom whole)
ff71783 * scrollbar.el: New file.
Jim Blandy authored
44 "Given a pair (NUM . DENOM) and WHOLE, return (/ (* NUM WHOLE) DENOM).
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
45 This is handy for scaling a position on a scroll bar into real units,
46 like buffer positions. If SCROLL-BAR-POS is the (PORTION . WHOLE) pair
47 from a scroll bar event, then (scroll-bar-scale SCROLL-BAR-POS
ff71783 * scrollbar.el: New file.
Jim Blandy authored
48 \(buffer-size)) is the position in the current buffer corresponding to
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
49 that scroll bar position."
ff71783 * scrollbar.el: New file.
Jim Blandy authored
50 ;; We multiply before we divide to maintain precision.
51 ;; We use floating point because the product of a large buffer size
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
52 ;; with a large scroll bar portion can easily overflow a lisp int.
ff71783 * scrollbar.el: New file.
Jim Blandy authored
53 (truncate (/ (* (float (car num-denom)) whole) (cdr num-denom))))
54
0ab660d Merged in changes from CVS HEAD
Karoly Lorentey authored
55 (defun scroll-bar-columns (side)
56 "Return the width, measured in columns, of the vertical scrollbar on SIDE.
57 SIDE must be the symbol `left' or `right'."
58 (let* ((wsb (window-scroll-bars))
59 (vtype (nth 2 wsb))
60 (cols (nth 1 wsb)))
61 (cond
62 ((not (memq side '(left right)))
63 (error "`left' or `right' expected instead of %S" side))
64 ((and (eq vtype side) cols))
65 ((eq (frame-parameter nil 'vertical-scroll-bars) side)
66 ;; nil means it's a non-toolkit scroll bar, and its width in
67 ;; columns is 14 pixels rounded up.
68 (ceiling (or (frame-parameter nil 'scroll-bar-width) 14)
69 (frame-char-width)))
70 (0))))
71
ff71783 * scrollbar.el: New file.
Jim Blandy authored
72
16d5414 * term/x-win.el (scroll-bar-mode, scroll-bar-mode): Move these
Jim Blandy authored
73 ;;;; Helpful functions for enabling and disabling scroll bars.
74
1bcda60 Corg-kun (scroll-bar-mode): Extra defvar to avoid warning.
Corg-kun authored
75 (defvar scroll-bar-mode)
625242b Merged from emacs@sv.gnu.org.
Karoly Lorentey authored
76 (defvar previous-scroll-bar-mode nil)
1bcda60 Corg-kun (scroll-bar-mode): Extra defvar to avoid warning.
Corg-kun authored
77
e523abb Corg-kun (scroll-bar-mode-explicit): New variable.
Corg-kun authored
78 (defvar scroll-bar-mode-explicit nil
79 "Non-nil means `set-scroll-bar-mode' should really do something.
80 This is nil while loading `scroll-bar.el', and t afterward.")
81
8343d46 (set-scroll-bar-mode): Take just one arg.
Karl Heuer authored
82 (defun set-scroll-bar-mode-1 (ignore value)
83 (set-scroll-bar-mode value))
84
85 (defun set-scroll-bar-mode (value)
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
86 "Set `scroll-bar-mode' to VALUE and put the new value into effect."
625242b Merged from emacs@sv.gnu.org.
Karoly Lorentey authored
87 (if scroll-bar-mode
88 (setq previous-scroll-bar-mode scroll-bar-mode))
89
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
90 (setq scroll-bar-mode value)
91
e523abb Corg-kun (scroll-bar-mode-explicit): New variable.
Corg-kun authored
92 (when scroll-bar-mode-explicit
eec8e60 Fix toolbars on X frames when Emacs is started on a tty. (Reported by Ri...
Karoly Lorentey authored
93 (modify-all-frames-parameters (list (cons 'vertical-scroll-bars
94 scroll-bar-mode)))))
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
95
c54d8e3 (set-scroll-bar-mode): Initialize to new built-in variable
Kim F. Storm authored
96 (defcustom scroll-bar-mode default-frame-scroll-bars
47ad7e2 * align.el:
Lute Kamstra authored
97 "Specify whether to have vertical scroll bars, and on which side.
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
98 Possible values are nil (no scroll bars), `left' (scroll bars on left)
99 and `right' (scroll bars on right).
4175984 Corg-kun (scroll-bar-mode): Doc fix.
Corg-kun authored
100 To set this variable in a Lisp program, use `set-scroll-bar-mode'
101 to make it take real effect.
102 Setting the variable with a customization buffer also takes effect."
e62b400 Miles Bader (scroll-bar-mode): Correctly specify `nil' choice.
snogglethorpe authored
103 :type '(choice (const :tag "none (nil)" nil)
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
104 (const left)
105 (const right))
106 :group 'frames
08f9697 Corg-kun (scroll-bar-mode): Specify :initialize.
Corg-kun authored
107 ;; The default value for :initialize would try to use :set
108 ;; when processing the file in cus-dep.el.
109 :initialize 'custom-initialize-default
8343d46 (set-scroll-bar-mode): Take just one arg.
Karl Heuer authored
110 :set 'set-scroll-bar-mode-1)
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
111
e523abb Corg-kun (scroll-bar-mode-explicit): New variable.
Corg-kun authored
112 ;; We just set scroll-bar-mode, but that was the default.
113 ;; If it is set again, that is for real.
114 (setq scroll-bar-mode-explicit t)
115
f38dbaf paveljanik (scroll-bar-mode): Make argument optional.
paveljanik authored
116 (defun scroll-bar-mode (&optional flag)
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
117 "Toggle display of vertical scroll bars on all frames.
16d5414 * term/x-win.el (scroll-bar-mode, scroll-bar-mode): Move these
Jim Blandy authored
118 This command applies to all frames that exist and frames to be
119 created in the future.
994323f Juanma Barranquero * scroll-bar.el (scroll-bar-mode): Turn off scroll bars when
lektu authored
120 With a numeric argument, if the argument is positive
121 turn on scroll bars; otherwise turn off scroll bars."
16d5414 * term/x-win.el (scroll-bar-mode, scroll-bar-mode): Move these
Jim Blandy authored
122 (interactive "P")
c023e19 * scroll-bar.el (scroll-bar-mode): Variable deleted.
Jim Blandy authored
123
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
124 ;; Tweedle the variable according to the argument.
47ad7e2 * align.el:
Lute Kamstra authored
125 (set-scroll-bar-mode (if (if (null flag)
c54d8e3 (set-scroll-bar-mode): Initialize to new built-in variable
Kim F. Storm authored
126 (not scroll-bar-mode)
127 (setq flag (prefix-numeric-value flag))
994323f Juanma Barranquero * scroll-bar.el (scroll-bar-mode): Turn off scroll bars when
lektu authored
128 (or (not (numberp flag)) (> flag 0)))
625242b Merged from emacs@sv.gnu.org.
Karoly Lorentey authored
129 (or previous-scroll-bar-mode
130 default-frame-scroll-bars))))
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
131
132 (defun toggle-scroll-bar (arg)
133 "Toggle whether or not the selected frame has vertical scroll bars.
134 With arg, turn vertical scroll bars on if and only if arg is positive.
135 The variable `scroll-bar-mode' controls which side the scroll bars are on
136 when they are turned on; if it is nil, they go on the left."
137 (interactive "P")
138 (if (null arg)
139 (setq arg
140 (if (cdr (assq 'vertical-scroll-bars
141 (frame-parameters (selected-frame))))
68d074f (toggle-scroll-bar): Call prefix-numeric-value.
Karl Heuer authored
142 -1 1))
143 (setq arg (prefix-numeric-value arg)))
bc850ac (scroll-bar-mode, toggle-scroll-bar): By default,
Geoff Voelker authored
144 (modify-frame-parameters
145 (selected-frame)
146 (list (cons 'vertical-scroll-bars
147 (if (> arg 0)
c54d8e3 (set-scroll-bar-mode): Initialize to new built-in variable
Kim F. Storm authored
148 (or scroll-bar-mode default-frame-scroll-bars))))))
9fce266 Corg-kun (toggle-scroll-bar): Moved from frame.el.
Corg-kun authored
149
150 (defun toggle-horizontal-scroll-bar (arg)
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.
153 Horizontal scroll bars aren't implemented yet."
154 (interactive "P")
155 (error "Horizontal scroll bars aren't implemented yet"))
16d5414 * term/x-win.el (scroll-bar-mode, scroll-bar-mode): Move these
Jim Blandy authored
156
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
157 ;;;; Buffer navigation using the scroll bar.
ff71783 * scrollbar.el: New file.
Jim Blandy authored
158
7959216 * x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier authored
159 ;; This was used for up-events on button 2, but no longer.
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
160 (defun scroll-bar-set-window-start (event)
161 "Set the window start according to where the scroll bar is dragged.
162 EVENT should be a scroll bar click or drag event."
ff71783 * scrollbar.el: New file.
Jim Blandy authored
163 (interactive "e")
5a041ab JimB's changes since January 18th
Jim Blandy authored
164 (let* ((end-position (event-end event))
ff71783 * scrollbar.el: New file.
Jim Blandy authored
165 (window (nth 0 end-position))
166 (portion-whole (nth 2 end-position)))
7959216 * x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier authored
167 (with-current-buffer (window-buffer window)
ff71783 * scrollbar.el: New file.
Jim Blandy authored
168 (save-excursion
bacb8ac * scroll-bar.el (scroll-bar-set-window-start): Remember that the
Jim Blandy authored
169 (goto-char (+ (point-min)
170 (scroll-bar-scale portion-whole
171 (- (point-max) (point-min)))))
ff71783 * scrollbar.el: New file.
Jim Blandy authored
172 (beginning-of-line)
173 (set-window-start window (point))))))
174
4406e03 Corg-kun (scroll-bar-drag-position): New function.
Corg-kun authored
175 (defun scroll-bar-drag-position (portion-whole)
176 "Calculate new window start for drag event."
177 (save-excursion
178 (goto-char (+ (point-min)
179 (scroll-bar-scale portion-whole
180 (- (point-max) (point-min)))))
181 (beginning-of-line)
182 (point)))
183
184 (defun scroll-bar-maybe-set-window-start (event)
185 "Set the window start according to where the scroll bar is dragged.
186 Only change window start if the new start is substantially different.
187 EVENT should be a scroll bar click or drag event."
188 (interactive "e")
189 (let* ((end-position (event-end event))
190 (window (nth 0 end-position))
191 (portion-whole (nth 2 end-position))
192 (next-portion-whole (cons (1+ (car portion-whole))
193 (cdr portion-whole)))
194 portion-start
195 next-portion-start
196 (current-start (window-start window)))
7959216 * x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier authored
197 (with-current-buffer (window-buffer window)
4406e03 Corg-kun (scroll-bar-drag-position): New function.
Corg-kun authored
198 (setq portion-start (scroll-bar-drag-position portion-whole))
199 (setq next-portion-start (max
200 (scroll-bar-drag-position next-portion-whole)
201 (1+ portion-start)))
a6228a6 (scroll-bar-maybe-set-window-start): Change window
Geoff Voelker authored
202 (if (or (>= current-start next-portion-start)
4406e03 Corg-kun (scroll-bar-drag-position): New function.
Corg-kun authored
203 (< current-start portion-start))
87dcbf6 (scroll-bar-maybe-set-window-start): Always set
Karl Heuer authored
204 (set-window-start window portion-start)
205 ;; Always set window start, to ensure scroll bar position is updated.
206 (set-window-start window current-start)))))
4406e03 Corg-kun (scroll-bar-drag-position): New function.
Corg-kun authored
207
aced197 Corg-kun (scroll-bar-drag, scroll-bar-drag-1): New functions.
Corg-kun authored
208 ;; Scroll the window to the proper position for EVENT.
209 (defun scroll-bar-drag-1 (event)
210 (let* ((start-position (event-start event))
211 (window (nth 0 start-position))
212 (portion-whole (nth 2 start-position)))
7959216 * x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier authored
213 (with-current-buffer (window-buffer window)
87b5452 Corg-kun (scroll-bar-drag-1):
Corg-kun authored
214 ;; Calculate position relative to the accessible part of the buffer.
215 (goto-char (+ (point-min)
216 (scroll-bar-scale portion-whole
217 (- (point-max) (point-min)))))
be2a368 Juanma Barranquero (scroll-bar-drag-1): Replace beginning-of-line with vertical-motion.
lektu authored
218 (vertical-motion 0 window)
aced197 Corg-kun (scroll-bar-drag, scroll-bar-drag-1): New functions.
Corg-kun authored
219 (set-window-start window (point)))))
220
221 (defun scroll-bar-drag (event)
222 "Scroll the window by dragging the scroll bar slider.
223 If you click outside the slider, the window scrolls to bring the slider there."
224 (interactive "e")
5cedbd3 Corg-kun (scroll-bar-drag): Bind echo-keystrokes to 0.
Corg-kun authored
225 (let* (done
1865431 Corg-kun (scroll-bar-drag): Set point-before-scroll
Corg-kun authored
226 (echo-keystrokes 0)
227 (end-position (event-end event))
228 (window (nth 0 end-position))
229 (before-scroll))
230 (with-current-buffer (window-buffer window)
231 (setq before-scroll point-before-scroll))
232 (save-selected-window
233 (select-window window)
234 (setq before-scroll
235 (or before-scroll (point))))
236 (scroll-bar-drag-1 event)
237 (track-mouse
238 (while (not done)
239 (setq event (read-event))
240 (if (eq (car-safe event) 'mouse-movement)
241 (setq event (read-event)))
242 (cond ((eq (car-safe event) 'scroll-bar-movement)
243 (scroll-bar-drag-1 event))
244 (t
245 ;; Exit when we get the drag event; ignore that event.
246 (setq done t)))))
247 (sit-for 0)
248 (with-current-buffer (window-buffer window)
249 (setq point-before-scroll before-scroll))))
aced197 Corg-kun (scroll-bar-drag, scroll-bar-drag-1): New functions.
Corg-kun authored
250
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
251 (defun scroll-bar-scroll-down (event)
252 "Scroll the window's top line down to the location of the scroll bar click.
253 EVENT should be a scroll bar click."
ff71783 * scrollbar.el: New file.
Jim Blandy authored
254 (interactive "e")
1865431 Corg-kun (scroll-bar-drag): Set point-before-scroll
Corg-kun authored
255 (let* ((end-position (event-end event))
256 (window (nth 0 end-position))
257 (before-scroll))
258 (with-current-buffer (window-buffer window)
259 (setq before-scroll point-before-scroll))
d4cfbbf (scroll-bar-scroll-down, scroll-bar-scroll-up):
Karl Heuer authored
260 (unwind-protect
261 (save-selected-window
262 (let ((portion-whole (nth 2 end-position)))
263 (select-window window)
264 (setq before-scroll
265 (or before-scroll (point)))
266 (scroll-down
267 (scroll-bar-scale portion-whole (1- (window-height)))))
268 (sit-for 0))
269 (with-current-buffer (window-buffer window)
270 (setq point-before-scroll before-scroll)))))
ff71783 * scrollbar.el: New file.
Jim Blandy authored
271
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
272 (defun scroll-bar-scroll-up (event)
273 "Scroll the line next to the scroll bar click to the top of the window.
274 EVENT should be a scroll bar click."
ff71783 * scrollbar.el: New file.
Jim Blandy authored
275 (interactive "e")
1865431 Corg-kun (scroll-bar-drag): Set point-before-scroll
Corg-kun authored
276 (let* ((end-position (event-end event))
277 (window (nth 0 end-position))
278 (before-scroll))
279 (with-current-buffer (window-buffer window)
280 (setq before-scroll point-before-scroll))
d4cfbbf (scroll-bar-scroll-down, scroll-bar-scroll-up):
Karl Heuer authored
281 (unwind-protect
282 (save-selected-window
283 (let ((portion-whole (nth 2 end-position)))
284 (select-window window)
285 (setq before-scroll
286 (or before-scroll (point)))
287 (scroll-up
288 (scroll-bar-scale portion-whole (1- (window-height)))))
289 (sit-for 0))
290 (with-current-buffer (window-buffer window)
291 (setq point-before-scroll before-scroll)))))
ff71783 * scrollbar.el: New file.
Jim Blandy authored
292
293
00a98b7 (scroll-bar-timer): New.
Gerd Moellmann authored
294 ;;; Tookit scroll bars.
ff71783 * scrollbar.el: New file.
Jim Blandy authored
295
00a98b7 (scroll-bar-timer): New.
Gerd Moellmann authored
296 (defun scroll-bar-toolkit-scroll (event)
297 (interactive "e")
298 (let* ((end-position (event-end event))
299 (window (nth 0 end-position))
300 (part (nth 4 end-position))
301 before-scroll)
d6f2ad9 (scroll-bar-timer): Variable removed.
Gerd Moellmann authored
302 (cond ((eq part 'end-scroll))
00a98b7 (scroll-bar-timer): New.
Gerd Moellmann authored
303 (t
304 (with-current-buffer (window-buffer window)
305 (setq before-scroll point-before-scroll))
306 (save-selected-window
307 (select-window window)
308 (setq before-scroll (or before-scroll (point)))
309 (cond ((eq part 'above-handle)
310 (scroll-up '-))
311 ((eq part 'below-handle)
312 (scroll-up nil))
fe852bb monnier (scroll-bar-toolkit-scroll): add handling of the `ratio'
monnier authored
313 ((eq part 'ratio)
314 (let* ((portion-whole (nth 2 end-position))
315 (lines (scroll-bar-scale portion-whole
316 (1- (window-height)))))
317 (scroll-up (cond ((not (zerop lines)) lines)
318 ((< (car portion-whole) 0) -1)
319 (t 1)))))
00a98b7 (scroll-bar-timer): New.
Gerd Moellmann authored
320 ((eq part 'up)
321 (scroll-up -1))
322 ((eq part 'down)
323 (scroll-up 1))
324 ((eq part 'top)
325 (set-window-start window (point-min)))
326 ((eq part 'bottom)
327 (goto-char (point-max))
328 (recenter))
329 ((eq part 'handle)
330 (scroll-bar-drag-1 event))))
331 (sit-for 0)
332 (with-current-buffer (window-buffer window)
333 (setq point-before-scroll before-scroll))))))
aced197 Corg-kun (scroll-bar-drag, scroll-bar-drag-1): New functions.
Corg-kun authored
334
00a98b7 (scroll-bar-timer): New.
Gerd Moellmann authored
335
336
337 ;;;; Bindings.
338
7959216 * x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier authored
339 ;; For now, we'll set things up to work like xterm.
b98d44a (toplevel): Test if `x-toolkit-scroll-bars' is
Gerd Moellmann authored
340 (cond ((and (boundp 'x-toolkit-scroll-bars) x-toolkit-scroll-bars)
00a98b7 (scroll-bar-timer): New.
Gerd Moellmann authored
341 (global-set-key [vertical-scroll-bar mouse-1]
342 'scroll-bar-toolkit-scroll))
343 (t
344 (global-set-key [vertical-scroll-bar mouse-1]
345 'scroll-bar-scroll-up)
346 (global-set-key [vertical-scroll-bar drag-mouse-1]
347 'scroll-bar-scroll-up)
348 (global-set-key [vertical-scroll-bar down-mouse-2]
349 'scroll-bar-drag)
350 (global-set-key [vertical-scroll-bar mouse-3]
351 'scroll-bar-scroll-down)
352 (global-set-key [vertical-scroll-bar drag-mouse-3]
353 'scroll-bar-scroll-down)))
ff71783 * scrollbar.el: New file.
Jim Blandy authored
354
355
7aea9e6 These are in preparation for a more thorough renaming to occur soon.
Jim Blandy authored
356 (provide 'scroll-bar)
ff71783 * scrollbar.el: New file.
Jim Blandy authored
357
1f9eac3 Fix up comment convention on the arch-tag lines.
Stefan Monnier authored
358 ;; arch-tag: 6f1d01d0-0b1e-4bf8-86db-d491e0f399f3
bd4fa13 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy authored
359 ;;; scroll-bar.el ends here
Something went wrong with that request. Please try again.