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

Re: emacs et la molette



Salut,

voici ce que je me suis fait:
(les touches F2 et F3 servent à modifier la vitesse du scroll)

(setq nb-ligne-scroll 5)

;Function to Scroll
(defun scrollup ()
  (interactive)
  (previous-line nb-ligne-scroll)
)

(defun scrolldown ()
  (interactive)
  (next-line nb-ligne-scroll)
)

(defun scroll-less ()
  (interactive)
  (setq nb-ligne-scroll (- nb-ligne-scroll 1))
  (cond ((< nb-ligne-scroll 0)
	(setq nb-ligne-scroll 0))
	)
  (message "%d lignes sur mollette" nb-ligne-scroll)
)

(defun scroll-more ()
  (interactive)
  (setq nb-ligne-scroll (+ nb-ligne-scroll 1))
  (cond ((> nb-ligne-scroll 15)
	(setq nb-ligne-scroll 15))
	)
  (message "%d lignes sur mollette" nb-ligne-scroll)
)

(global-set-key [f2] 'scroll-less)
(global-set-key [f3] 'scroll-more)

 ______
|  Manganneau Emmanuel    |   gsm : 06 64 09 73 07 |
|    PimenTech SARL       |   tel : 01 43 56 05 00 |
|  manu@pimentech.net     |   fax : 01 43 56 05 50 |
`--------------------------------------------------'



Reply to: