User Tools

Site Tools


emacs:emacs

This is an old revision of the document!


Emacs

Configuring Emacs

Mousewheel on lxplus

If you use emacs on lxplus, the mousewheel isn't enabled. To add this functionality, open your ~/.emacs file and write in the following lines:

(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))

(defun up-one () (interactive) (scroll-up 1))
(defun down-one () (interactive) (scroll-down 1))

(defun up-a-lot () (interactive) (scroll-up))
(defun down-a-lot () (interactive) (scroll-down))

(defun scroll-up-half ()
"Scroll up half a page."
(interactive)
(scroll-up (/ (window-height) 2))
)
(defun scroll-down-half ()
"Scroll down half a page."
(interactive)
(scroll-down (/ (window-height) 2))
)

(global-set-key [(mouse-5)] 'up-slightly)
(global-set-key [(mouse-4)] 'down-slightly)
(global-set-key [S-mouse-4] 'down-one)
(global-set-key [S-mouse-5] 'up-one)
(global-set-key [C-mouse-4] 'down-a-lot)
(global-set-key [C-mouse-5] 'up-a-lot)
emacs/emacs.1228223987.txt.gz · Last modified: 2008/12/02 14:19 by decianm