Skip to content

Molette de souris et XEmacs

Pour que XEmacs traite correctement la molette de la souris, il suffit d'ajouter dans ~/.xemacs/custom.el ou dans ~/.xemacs/init.el la command suivante :

(mwheel-install)
La manipulation était plus complexe dans les version précédentes. A titre d'archives, voici un exemple de fichier d'initialisation qui permettait d'ajouter quelques comportements, aujourd'hui présents en standard :

(setq default-tab-width 3)
;(define-key global-map [(dead-circumflex) A] "\C-q302")
;(define-key global-map [(dead-circumflex) E] "\C-q312")
;(define-key global-map [(dead-circumflex) I] "\C-q316")
;(define-key global-map [(dead-circumflex) 0] "\C-q324")
;(define-key global-map [(dead-circumflex) U] "\C-q333")
;(define-key global-map [(dead-circumflex) a] "\C-q342")
;(define-key global-map [(dead-circumflex) e] "\C-q352")
;(define-key global-map [(dead-circumflex) i] "\C-q356")
;(define-key global-map [(dead-circumflex) o] "\C-q364")
;(define-key global-map [(dead-circumflex) u] "\C-q373")
;; (setq auto-mode-alist
;; (append
;; '(("\\.C$" . c++-mode)
;; ("\\.H$" . c++-mode)
;; ("\\.cc$" . c++-mode)
;; ("\\.sc$" . c++-mode)
;; ("\\.ccp$" . c++-mode)
;; ("\\.pc$" . c++-mode)
;; ("\\.hh$" . c++-mode)
;; ("\\.c$" . c++-mode)
;; ("\\.h$" . c++-mode)
;; ("\\.m$" . objc-mode)
;; ("\\.java$" . java-mode)
;; ) auto-mode-alist))
;(setq auto-mode-alist (cons '("\\.h$" . c++-mode) auto-mode-alist))
;;(set 'tab-width 3)
:; Options Menu Setting
;; =====================
;(cond
; ((and (string-match "XEmacs" emacs-version)
; (boundp 'emacs-major-version)
; (or (and
; (= emacs-major-version 19)
; (>= emacs-minor-version 14))
; (= emacs-major-version 20))
; (fboundp 'load-options-file))
; (load-options-file "/home/sd/.xemacs-options")))
;; ============================
;; End of Options Menu Settings




;;=============================================================================
;; 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)
)))


;;=============================================================================
;; scroll on numpad
;;=============================================================================

(define-key global-map 'kp_9 'scroll-down)
(define-key global-map 'kp_3 'scroll-up)
(define-key global-map 'kp_6
'(lambda (&rest args) (interactive) (other-window 1)))
(define-key global-map 'kp_4
'(lambda (&rest args) (interactive) (other-window -1)))
(define-key global-map 'kp_2
'(lambda (&rest args) (interactive) (scroll-up 1)))
(define-key global-map 'kp_8
'(lambda (&rest args) (interactive) (scroll-down 1)))
(define-key global-map 'kp_7 'beginning-of-buffer)
(define-key global-map 'kp_1 'end-of-buffer)
(define-key global-map 'kp_5
'(lambda (&rest args) (interactive) (recenter 0)))

Rétroliens

Pas de rétroliens

Commentaires

Afficher les commentaires en Vue non groupée | Vue groupée

Pas de commentaires

Ajouter un commentaire

Marquer un texte en gras: *mot*, souligner un texte: _mot_.
Les smilies standard comme :-) et ;-) sont convertis en images.
:'(  :-)  :-|  :-O  :-(  8-)  :-D  :-P  ;-) 
Les adresses Email ne sont pas affichées, et sont seulement utilisées pour la communication.

Pour éviter le spam par des robits automatisés (spambots), merci d'entrer les caractères que vous voyez dans l'image ci-dessous dans le champ de fomulaire prévu à cet effet. Assurez-vous que votre navigateur gère et accepte les cookies, sinon votre commentaire ne pourra pas être enregistré.
CAPTCHA

Form options