help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Customizing Cntl + mouse-wheel to scroll a page in v21


From: Allan Gottlieb
Subject: Customizing Cntl + mouse-wheel to scroll a page in v21
Date: 03 Nov 2001 12:17:28 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Like many others I added code (see below) to my v20 .emacs to have the
mouse wheel act as follows
   no modifier:  scroll up/down 5 lines
   shift:        scroll up/down 1 line
   control:      scroll up/down 1 page

I noticed in emacs 21 that one can customize the first two and have
done so.  For the third, I don't see it in customize.

It is no problem to use the v20 elisp to accomplish this, but I prefer
to use customize when possible.

Thanks (and thanks a bunch for v21),
allan

================================================================

;;
;; Makes the wheel mouse work
;;
(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))
(global-set-key [mouse-4] 'down-slightly)
(global-set-key [mouse-5] 'up-slightly)

(defun up-one () (interactive) (scroll-up 1))
(defun down-one () (interactive) (scroll-down 1))
(global-set-key [S-mouse-4] 'down-one)
(global-set-key [S-mouse-5] 'up-one)

(defun up-a-lot () (interactive) (scroll-up))
(defun down-a-lot () (interactive) (scroll-down))
(global-set-key [C-mouse-4] 'down-a-lot)  ;; could be scroll-down directly
(global-set-key [C-mouse-5] 'up-a-lot)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]