(custom-set-variables '(default-input-method "latin-1-prefix") '(load-home-init-file t t) '(gnuserv-program (concat exec-directory "/gnuserv")) '(case-fold-search t) '(global-font-lock-mode t nil (font-lock)) '(current-language-environment "latin-1") '(transient-mark-mode t)) (custom-set-faces) ;;---------------------- PATHS - LIBRAIRIES -------------- ;; Ajout de librairies ;; Positionner la variable `my-lisp-directory' sur une chaine de ;; caractères contenant le chemin complet du repertoire contenant les ;; fichiers lisp. (setq my-lisp-directory (expand-file-name "~/emacs-lisp/")) ;; Ajouter ce répertoire à la liste des répertoires contenant les ;; librairies : (add-to-list 'load-path my-lisp-directory) ;; path pour le tuareg-mode (mode CAML) ;;(setq load-path (cons "/home/danthony/emacs_caml_mode" load-path)) ;;essai pour auto-fill mode (add-hook 'text-mode-hook 'turn-on-auto-fill) ;;----------------------- BUFFERS - SHELL ----------------- ;;pour eviter les lignes inutiles a la fin d'un fichier (setq next-line-add-newlines nil) ;; Pour que la couleur marche en mode shell. uniquement en emacs 21 (autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) ;; On passe en ISO 8859 Latin-1 (les accents, ...) (if (>= emacs-major-version 21) (progn (set-language-environment 'latin-1) (set-terminal-coding-system 'latin-1) (set-keyboard-coding-system 'latin-1) (setq selection-coding-system 'compound-text-with-extensions) ;;from mmoy (auto-image-file-mode t) ) (progn (set-terminal-coding-system 'latin-1) (set-keyboard-coding-system 'latin-1) (set-language-environment 'latin-1) ) ) ;; La barre de menu (emacs 21) ne sert (presque) jamais ... ;;(menu-bar-mode -1) (if (>= emacs-major-version 21) (progn (tool-bar-mode -1) (scroll-bar-mode -1) (setq-default cursor-in-non-selected-windows nil) )) ;; Enlever le curseur clignotant (if (>= emacs-major-version 21) (blink-cursor-mode -1)) ;; et le BEEP insupportable (setq visible-bell 't) ;; Pour mettre la region en surbrillance (et voir ce qu'on cut/paste) ;; (C-g fait disparaitre la surbrillance) (transient-mark-mode t) ;; Mode auto-fill : retour ligne au bout de 80 caractères ;;(add-hook 'text-mode-hook ;; (lambda () ;; (auto-fill-mode t) ;; (setq default-justification 'full)) ;; ) ;; Redefinition de touches (global-set-key "\M-s" 'dabbrev-expand) (global-set-key "\M-g" 'goto-line) (global-set-key [C-tab] 'other-window) (global-set-key "\C-z" 'comment-region) ;;changer intelligemment de buffer ;; iswitch CTRL-x b puis CTRLs ou CTRL-r (require 'iswitchb) (iswitchb-default-keybindings) ;; MOVING THE CURSOR IN THE BUFFER ;; when moving the cursor to the bottom/top of screen, scroll up/down 2 lines (setq scroll-step 3) ;; when moving page up/down, keep 1 line in common (setq next-screen-context-lines 1) (global-set-key [home] 'beginning-of-line) (global-set-key [end] 'end-of-line) ;; Le curseur reste toujours à la même position quand on scroll (setq scroll-preserve-screen-position t) ;; Une touche DEL qui fait vraiment DEL !!! (and window-system (functionp 'normal-erase-is-backspace-mode) (normal-erase-is-backspace-mode nil)) ;;Histoire de savoir sur quel fichier précisément on travaille. (setq frame-title-format '(buffer-file-name "Emacs: %b (%f)" "Emacs: %b")) ;;--maxima -- ;;(require 'imaxima) ;;(setq imaxima-use-maxima-mode-flag `t) ;;(setq imaxima-use-maxima-mode `t) ;;-------------------------TEX--------------------------------- (require 'tex-site) (require 'font-latex) (setq TeX-save-query nil) (load "tex-site") ;; pour inserer automatiquement le header de mes docs tex (add-hook 'find-file-hooks 'auto-insert) (load-library "autoinsert") (setq auto-insert-directory "~/emacs-lisp/") (setq auto-insert-alist (append '((latex-mode . "tex-insert.tex")) auto-insert-alist)) ;;--------------------------CAML------------------------------ ;; append-tuareg.el - Tuareg quick installation: Append this file to .emacs. (setq auto-mode-alist (cons '("\\.ml\\w?" . tuareg-mode) auto-mode-alist)) (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t) (autoload 'camldebug "camldebug" "Run the Caml debugger" t) (if (and (boundp 'window-system) window-system) (if (string-match "XEmacs" emacs-version) (require 'sym-lock) (require 'font-lock))) ;;---------------------------HTML------------------------------ ;;pour pouvoir utiliser les couleurs d'un mode en html (autoload 'htmlfontify-buffer "htmlfontify" "Create a new buffer, named for the current buffer + a .html extension, containing an inline css-stylesheet and formatted css-markup html that reproduces the look of the current emacs buffer as closely as possible. Dangerous characters in the existing buffer are turned into html entities, so you should even be able to do html-within-html fontified display. If the SRCDIR and FILE arguments are set, lookup etags derived entries in the `hfy-tags-cache' and add html anchors and hyperlinks as appropriate." t) ;;---------------------------La modeline ------------------------ ;;modeline (setq column-number-mode t) (setq line-number-mode t) (setq display-time-string-forms '((format "[%s/%s/%s]-[%s:%s] " day month year 24-hours minutes ) (if mail "==Mail==" load))) ;; horloge (display-time) ;; lustre (setq auto-mode-alist (cons '("\\.lus$" . lustre-mode) auto-mode-alist)) (autoload 'lustre-mode "lustre" "Edition de code lustre" t) ;;; set the load-path variable : ; (setq load-path ; (append load-path ; '("/home/dir_where_you_put_lustre.el"))) ;;; Byte-compile lustre.el to speed-up ;;; the loading of a lustre source file : ; M-x byte-compile-file -> lustre.el ; \C-c\C-c -> send a node to the lustre compiler. ; To close the compilation window : ; \C-x 0 while in compilation buffer ; or \C-x 1 while in source buffer ; ; TAB -> indent current line. ;; accents en qwerty (require 'fracc) (add-hook 'find-file-hooks '(lambda () (fracc-mode (fracc-select-default-encoding))) ) ;;completion avec shift-tab (abbrev-mode t) ; completion automatique (global-set-key (quote [S-tab]) (quote dabbrev-expand))