Monday, November 10, 2008

xemacs + scroll mouse

For some reason, button4 and button5 in Mandriva 2009 return C-M-) and C-M-( in xemacs...

added

(define-key global-map [(control meta \()]
'(lambda (&rest args)
(interactive)
(let ((curwin (selected-window)))
(select-window (car (mouse-pixel-position)))
(scroll-down 5)
(select-window curwin)
)))

and
(define-key global-map [(control meta \))]
'(lambda (&rest args)
(interactive)
(let ((curwin (selected-window)))
(select-window (car (mouse-pixel-position)))
(scroll-up 5)
(select-window curwin)
)))

in my init.el file to get back to original behavior.

No comments: