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

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

mouse-wheel scrolling for the "other" window


From: Klaus Berndl
Subject: mouse-wheel scrolling for the "other" window
Date: 08 Oct 2002 16:21:14 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Suggestion:

How about to add code like the following to the Emacs distribution:

,----
| (global-set-key (kbd "M-<mouse-wheel>")
|                 'mouse-wheel-scroll-line-other-window)
| 
| (defun mouse-wheel-scroll-line-other-window (event)
|   "Scroll the other window in which EVENT occurred by
| `mouse-wheel-scroll-amount'."
|   (interactive "e")
|   (condition-case nil
|       (if (< (car (cdr (cdr event))) 0)
|         (scroll-other-window mouse-wheel-scroll-amount)
|       (scroll-other-window (* -1 mouse-wheel-scroll-amount)))
|     (error nil)))
`----

IMHO this is very useful for people using a mouse-wheel, e.g. in Gnus to read
articles, reading long docstrings in a help buffer etc...

Ciao,
Klaus

-- 
Klaus Berndl                    mailto: klaus.berndl@sdm.de
sd&m AG                         http://www.sdm.de
software design & management    
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220


reply via email to

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