;;; .emacs -- Root emacs configuration file ;; Copyright (C) 2001,2002,2006,2009 Bruno BEAUFILS ;; Author: Bruno Beaufils ;; Created: 20 August 2001 ;; Version: 3 ;; X-CVS: $Id$ ;;; Commentary: ;; Ce fichier est largement base sur le fichier bbb-emacs.el ;; Sur une installation debian pour que emacs fonctionne pas trop mal il faut ;; au minimum installer les paquetages suivants : ;; auctex ;; crypt++el ;;; Code: ;;{{{ Configuration du clavier (global-set-key [home] 'beginning-of-line) (global-set-key [end] 'end-of-line) (global-set-key [(control home)] 'beginning-of-buffer) (global-set-key [(control end)] 'end-of-buffer) (global-set-key "\M-g" 'goto-line) (global-set-key [f12] 'undo) ;;}}} ;;{{{ Définition de macros (defmacro X11 (&rest x) "Evalue les arguments si et seulement si on est sous X/Window." (list 'if (eq window-system 'x) (cons 'progn x))) (defmacro CLEAN (&rest x) "Evalue les arguments, et recupere les erreurs eventuellement provoquees de facon a eviter l'arret du programme." (list 'condition-case 'error-desc (cons 'progn x) (list 'error (list 'message (list 'concat "### Erreur : " (list 'error-message-string 'error-desc)))))) ;;}}} ;;{{{ Configuration globale ;; Le repertoire des librairies (add-to-list 'load-path (expand-file-name "~/emacs")) ;; La vitesse du terminal : pas d'optimisation sauf quand je suis en mode texte. (setq baud-rate 2400) (X11 (setq baud-rate 1000000)) ;; Parametres d'editions (setq-default fill-column '78) ;; Pouvoir mettre en majuscule/minuscule sans questions. (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) ;; Affichage de la date et de l'heure (display-time) ;; Composition des caracteres accentues iso-latin1 avec ALT, C-x 8, ou ALT, ou ;; les touches mortes du clavier (require 'iso-transl) ;; Pour pouvoir saisir les touches accentues meme en ssh (latin9) ;;;(set-keyboard-coding-system 'iso-latin-9) ;; Pour que la recherche soit visible. (setq-default search-highlight t) (copy-face 'highlight 'isearch) ;; Couleurs sous X11 (X11 (set-foreground-color "Black") (set-background-color "Grey") (set-cursor-color "Navy") (set-mouse-color "Navy") ) ;; Pour enregistrer les timestamps (add-hook 'write-file-hooks 'time-stamp) ;;}}} ;;{{{ Configuration specifique ;;{{{ AUC-TeX (CLEAN (require 'tex-site) (X11 (require 'font-latex))) ;;}}} ;;{{{ dired-dd (add-hook 'dired-load-hook 'bbb-dired-load-hook) (defun bbb-dired-load-hook () "Hook utilise au chargement de dired." (load "dired-x") (X11 (require 'dired-dd))) ;;}}} ;;{{{ folding mode (autoload 'folding-mode "folding" "Folding mode" t) (autoload 'turn-off-folding-mode "folding" "Folding mode" t) (autoload 'turn-on-folding-mode "folding" "Folding mode" t) ;;}}} ;;{{{ nxml-mode (setq auto-mode-alist (append '(("\\.html$" . nxml-mode) ("\\.tmpl$" . nxml-mode) ("\\.xml$" . nxml-mode) ) auto-mode-alist)) ;;}}} ;;}}} ;;{{{ Customization ;;; '(eol-mnemonic-unix "(Unix)") (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(auto-save-interval 2000) '(blink-matching-paren t) '(blink-matching-paren-on-screen t) '(case-replace t) '(column-number-mode t) '(dired-listing-switches "-ali") '(display-time-24hr-format t) '(display-time-day-and-date t) '(display-time-format "%a %e %b %Y %H:%M") '(display-time-mode t nil (time)) '(display-time-use-mail-icon t) '(font-lock-maximum-decoration t) '(font-lock-maximum-size nil) '(global-font-lock-mode t nil (font-lock)) '(indent-tabs-mode t) '(line-number-mode t) '(mouse-wheel-mode t nil (mwheel)) '(paren-mode (quote paren) nil (paren)) '(show-paren-mode t nil (paren)) '(show-paren-style (quote mixed)) '(transient-mark-mode t) '(vc-command-messages t) '(vc-default-back-end (quote RCS)) '(vc-make-backup-files t) '(visible-bell t)) (X11 (custom-set-faces ;; custom-set-faces was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(font-lock-string-face ((((class color) (background light)) (:bold t :foreground "DarkBlue" :background "Grey")))) '(fringe ((((class color) (background light)) (:background "grey")))) '(highlight ((((class color) (background light)) (:foreground "Black" :background "darkseagreen2")))) '(mode-line ((t (:box (:line-width 1 :color "grey75" :style released-button) :weight normal)))) '(region ((t (:foreground "Black" :background "Tan")))) '(scroll-bar ((t (:box (:line-width 2 :color "grey75" :style released-button))))) '(secondary-selection ((((class color) (background light)) (:foreground "Black" :background "paleturquoise")))) '(sh-heredoc-face ((((class color) (background light)) (:foreground "red"))))) ) ;;}}} ;;; .emacs ends here