Mailing List Archive

Support open source code!


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

xemacs question



Scott Stone writes:
 > 
 > ok.. so how do I get my silly mouse wheel to work in xemacs?  I'm assuming
 > it's an Xresource setting, but the Xemacs PDF docs on the website are like 7
 > years out of date.  I dont think they HAD wheel mice back then.  "info
 > xemacs" just gives me the manpage which says that the current documentation
 > can be had via "info", so I'm in a circular pattern here.  This is 21.4.4,
 > straight vanilla source build.
 > 

I use the following in my .emacs file. There's nothing in my
.Xresources, so that must be it :).


;;=============================================================================
;;                    scroll on  mouse wheel
;;=============================================================================


;; scroll on wheel of mouses
(define-key global-map 'button4
  '(lambda (&rest args)
    (interactive) 
    (let ((curwin (selected-window)))
      (select-window (car (mouse-pixel-position)))
      (scroll-down 5)
      (select-window curwin)
)))
(define-key global-map [(shift button4)]
  '(lambda (&rest args)
    (interactive) 
    (let ((curwin (selected-window)))
      (select-window (car (mouse-pixel-position)))
      (scroll-down 1)
      (select-window curwin)
)))
(define-key global-map [(control button4)]
  '(lambda (&rest args)
    (interactive) 
    (let ((curwin (selected-window)))
      (select-window (car (mouse-pixel-position)))
      (scroll-down)
      (select-window curwin)
)))

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


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links