3 ;; Author: Olivier Tetard <olivier.tetard@miskin.fr>
4 ;; URL : http://toutoune25.miskin.fr/
6 ;; This file is free software; you can redistribute it and/or modify it
7 ;; under the terms of the GNU General Public License as published by the
8 ;; Free Software Foundation; either version 2, or (at your option) any
11 ;; This file is distributed in the hope that it will be useful, but
12 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;; General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GNU Emacs; see the file COPYING. If not, write to the Free
18 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 ;; Inspiré par les fichiers de :
22 ;; * Julien Danjou (julien.danjou.org)
23 ;; * Mark Triggs (http://grapevine.net.au/)
26 ;; | Extensions et paths
29 (push (expand-file-name "~/.elisp") load-path)
31 ;; Mozmail is available in XEmacs CVS :
32 ;; http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/net-utils/mozmail.el
34 (load "tt25-passwords" t)
35 ;; (require 'tt25-muse)
37 (require 'color-theme)
44 ;; | Couleurs et apparence
49 ;; (color-theme-dark-laptop))
51 ;old: (set-face-background 'default "black")
60 (if (>= emacs-major-version 23)
61 (set-frame-font "DejaVu Sans Mono-10"))
67 (server-start) ; Multi-tty powa !
68 (ido-mode t) ; Utilisation du mode ido
69 (setq auto-save-interval 1200) ; Autosave
70 (setq scroll-step 2) ; On se decale de 2 lignes quand on change de page
71 (delete-selection-mode t) ; On peut supprimer une selection
72 (fset 'yes-or-no-p 'y-or-n-p) ; yes == y
73 (show-paren-mode t) ; On affiche les parentheses liées
74 (setq display-time-24hr-format t) ; Heure au format 24h
75 (display-time) ; On affiche l'heure dans la barre
76 (setq visible-bell t) ; On desactive les beeps
77 (setq inhibit-startup-screen t) ; On désactive le splash screen
78 (setq use-file-dialog nil) ; Désactivation des boites de
79 (setq use-dialog-box nil) ; fichiers GTK+
80 (setq scroll-bar-mode 'right)
81 (column-number-mode 1)
83 ;; Configuration d'uniquify
84 (setq uniquify-buffer-name-style 'reverse)
85 (setq uniquify-separator "|")
86 (setq uniquify-after-kill-buffer-p t)
87 (setq uniquify-ignore-buffers-re "^\\*")
89 ;; Les copiers/coller doivent aller dans le clipboard de l'OS
90 (setq x-select-enable-clipboard t)
91 (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
93 ;; Quand vous recevez un fichier .txt d'une machine dos/windows il est
94 ;; très énervant de voir les ^M a chaque fin de ligne, utiliser M-x
95 ;; dos-unix pour vous en débarrasser. (J. Danjou)
98 (goto-char (point-min))
99 (while (search-forward "\r" nil t) (replace-match "")))
103 ;; (read-abbrev-file "~/.abbrev_defs")
104 (setq save-abbrevs t)
105 (global-set-key (quote [S-tab]) (quote dabbrev-expand))
108 (set default-major-mode 'text-mode)
109 (add-hook 'text-mode-hook 'turn-on-auto-fill)
111 ;; Enable longlines-mode for LaTeX files
112 (add-hook 'latex-mode-hook 'longlines-mode)
115 (setq lpr-command "/usr/bin/gtklp")
116 (setq ps-lpr-command "/usr/bin/gtklp")
118 ;; On utilise Mozilla Firefox
119 (defun browse-url-firefox-new-tab (url &optional new-window)
120 "Open URL in a new tab in Firefox."
121 ;; (interactive (browse-url-interactive-arg "URL: "))
122 (let ((cmd (shell-command-to-string
123 (concat "mozilla-firefox -a firefox -remote 'openURL("
124 url ",new-tab)' > /dev/null"))))
125 (unless (string= "" cmd)
126 (message "Starting Firefox...")
127 (start-process (concat "firefox " url) nil "/bin/sh" "-c"
128 (concat "mozilla-firefox " url "|| true"))
129 (message "Starting Firefox...done"))))
131 (setq browse-url-browser-function 'browse-url-firefox-new-tab)
137 (global-set-key "\C-cp" 'ps-print-buffer-with-faces)
140 ;; | Configuration pour les différants modes
144 ;;(setq tla-arch-branch 'baz)
145 ;;(tla-insinuate-gnus)
148 (setq ispell-program-name "aspell")
149 (setq ispell-dictionary "french")
151 ;; Pour JDE (Bug dans la sid)
152 (setq global-senator-minor-mode t)
155 (setq tex-dvi-view-command "evince")
156 (setq LaTeX-verbatim-environments (quote ("verbatim" "verbatim*" "lstlisting")))
157 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
160 (setq find-file-run-dired t)
161 (setq dired-listing-switches "-l")
162 (setq dired-recursive-deletes 'top)
165 (defalias 'perl-mode 'cperl-mode)
168 (setq-default indent-tabs-mode nil)
170 ;; Toujours avoir nouvelle ligne en fin de fichier
171 (setq require-final-newline t)
173 ;; Configuration de debian-changelog
174 (setq debian-changelog-full-name "Olivier Tétard")
175 (setq debian-changelog-mailing-address "olivier.tetard@miskin.fr")
177 (setq safe-local-variable-values
178 (quote ((TeX-PDF-mode . PDF))))
180 ;; Stolen from http://xemacs.seanm.ca/lisp/dired-extras.el
181 (defun dired-do-apply-function (func)
182 "Apply an interactive lisp function to all the marked files.
183 The function is not passed any arguments. The function honours restrictions."
184 (interactive "aFunction: ")
186 (dolist (file (dired-get-marked-files))
187 (message "Processing %s..." file)
188 (set-buffer (find-file-noselect file))
189 (goto-char (point-min))
194 (custom-set-variables
195 ;; custom-set-variables was added by Custom.
196 ;; If you edit it by hand, you could mess it up, so be careful.
197 ;; Your init file should contain only one such instance.
198 ;; If there is more than one, they won't work right.
199 '(TeX-output-view-style (quote (("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") "%(o?)dvips -t landscape %d -o && gv %f") ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") ("^dvi$" ("^\\(?:a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4\\)$" "^landscape$") "%(o?)xdvi %dS -paper a4r -s 0 %d") ("^dvi$" "^\\(?:a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4\\)$" "%(o?)xdvi %dS -paper a4 %d") ("^dvi$" ("^\\(?:a5\\(?:comb\\|paper\\)\\)$" "^landscape$") "%(o?)xdvi %dS -paper a5r -s 0 %d") ("^dvi$" "^\\(?:a5\\(?:comb\\|paper\\)\\)$" "%(o?)xdvi %dS -paper a5 %d") ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d") ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d") ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d") ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") ("^dvi$" "." "%(o?)xdvi %dS %d") ("^pdf$" "." "evince %o %(outpage)") ("^html?$" "." "netscape %o"))))
200 '(canlock-password "a29a3189d5be23f38adc9d2627e77c898e00cde1")
201 '(display-time-24hr-format t)
202 '(inhibit-startup-screen t)
203 '(mail-yank-prefix "> ")
204 '(muse-file-extension "muse")
205 '(muse-html-charset-default "utf-8")
206 '(muse-html-encoding-default (quote utf-8))
207 '(muse-html-meta-content-encoding (quote utf-8))
208 '(muse-html-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" charset=\"utf-8\" media=\"all\" href=\"/style.css\" />")
209 '(muse-mode-auto-p nil)
210 '(muse-publish-desc-transforms (quote (muse-wiki-publish-pretty-title muse-wiki-publish-pretty-interwiki muse-publish-escape-specials-in-string)))
211 '(muse-wiki-publish-small-title-words (quote ("the" "and" "at" "on" "of" "for" "in" "an" "a" "page" "anime")))
212 '(muse-xhtml-footer "~/documents/wiki/common/footer.html")
213 '(muse-xhtml-header "~/documents/wiki/common/header.html")
214 '(safe-local-variable-values (quote ((TeX-PDF-mode . "PDF") (TeX-PDF-mode . PDF)))))
216 ;; custom-set-faces was added by Custom.
217 ;; If you edit it by hand, you could mess it up, so be careful.
218 ;; Your init file should contain only one such instance.
219 ;; If there is more than one, they won't work right.
220 '(erc-current-nick-face ((t (:foreground "red" :slant oblique :background: "yellow"))))
221 '(highlight-current-line-face ((t (:background "#6699cc"))))
222 '(muse-bad-link-face ((t (:foreground "DeepPink" :underline "DeepPink" :weight bold))))
223 '(muse-link-face ((t (:foreground "blue" :underline "blue" :weight bold)))))