(require 'geek-mode)

msvc-mode
msvc-mode permet d'utiliser Visual Studio sous emacs comme compilateur ou permet de compiler simplement des solutions ou projets existant
Gestion de la molette
 (setq scroll-preserve-screen-position t)

 
 ;; Gestion de la roulette de la souris avec plusieurs vitesses
 ;; control + scroll      : grande vitesse
 ;; shift + scroll        : petite vitesse
 ;; scroll seul           : vitesse normale

 (defun up-slightly () (interactive) (scroll-up 5))
 (defun down-slightly () (interactive) (scroll-down 5))
 (global-set-key [mouse-4] 'down-slightly)
 (global-set-key [mouse-5] 'up-slightly)

 (defun up-one () (interactive) (scroll-up 1))
 (defun down-one () (interactive) (scroll-down 1))
 (global-set-key [S-mouse-4] 'down-one)
 (global-set-key [S-mouse-5] 'up-one)

 (defun up-a-lot () (interactive) (scroll-up))
 (defun down-a-lot () (interactive) (scroll-down))
 (global-set-key [C-mouse-4] 'down-a-lot)
 (global-set-key [C-mouse-5] 'up-a-lot)
supprimer les espaces de fin de lignes
 
 ;; Un petit morceau de code qui permet de supprimer les espaces
 ;; qui restent en fin de ligne.
 ;; Origine :  lutzeb @ cs.tu-berlin.de (Dirk Lutzebaeck) (1992)
 
 (defun delete-trailing-space ()
   "Deletes trailing space from all lines in buffer."
   (interactive)
   (or buffer-read-only
       (save-excursion
         (message "Deleting trailing spaces ... ")
         (goto-char (point-min))
         (while (< (point) (point-max))
           (end-of-line nil)
           (delete-horizontal-space)
           (forward-line 1))
         (message "Deleting trailing spaces ... done.")))
   nil) ; indicates buffer-not-saved for write-file-hook
  ;; la nouvelle fonction est associée au raccourci C-x espace
 (define-key ctl-x-map " " 'delete-trailing-space)
 
 (defun my-hook-save ()
  (cond ((eq major-mode 'c-mode) (delete-trailing-whitespace))
        ((eq major-mode 'c++-mode) (delete-trailing-whitespace))
        ((eq major-mode 'latex-mode) (delete-trailing-whitespace))
        ((eq major-mode 'tex-mode) (delete-trailing-whitespace))
        )
  )

(add-hook 'write-file-hooks 'my-hook-save)