3 ;; Author: Olivier Tetard <toutoune25@free.fr>
4 ;; URL : http://www.miskin.be/
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)
30 (push (expand-file-name "~/.elisp/bbdb/lisp") load-path)
31 (push (expand-file-name "~/.elisp/erc") load-path)
33 ;; Mozmail is available in XEmacs CVS :
34 ;; http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/net-utils/mozmail.el
36 (require 'tt25-passwords)
39 (require 'color-theme)
40 (require 'erc) ; Installé dans ~/.elisp/erc/
44 (require 'wikipedia-mode)
45 (autoload 'longlines-mode "longlines.el"
46 "Minor mode for editing long lines." t)
47 (add-to-list 'auto-mode-alist '("mozex.\\.*" . wikipedia-mode))
50 ;; | Couleurs et apparence
55 (color-theme-dark-laptop))
57 (set-face-background 'default "black")
69 (gnuserv-start) ; Utilisation de gnuserv
70 (ido-mode t) ; Utilisation du mode ido
71 (setq auto-save-interval 1200) ; Autosave
72 (setq scroll-step 2) ; On se decale de 2 lignes quand on change de page
73 (delete-selection-mode t) ; On peut supprimer une selection
74 (fset 'yes-or-no-p 'y-or-n-p) ; yes == y
75 (show-paren-mode t) ; On affiche les parentheses liées
76 (setq display-time-24hr-format t) ; Heure au format 24h
77 (display-time) ; On affiche l'heure dans la barre
78 (setq visible-bell t) ; On desactive les beeps
80 ;; Quand vous recevez un fichier .txt d'une machine dos/windows il est
81 ;; très énervant de voir les ^M a chaque fin de ligne, utiliser M-x
82 ;; dos-unix pour vous en débarrasser. (J. Danjou)
85 (goto-char (point-min))
86 (while (search-forward "\r" nil t) (replace-match "")))
90 (global-set-key (quote [S-tab]) (quote dabbrev-expand))
93 (set default-major-mode 'text-mode)
94 (add-hook 'text-mode-hook 'turn-on-auto-fill)
97 (setq lpr-command "/usr/bin/gtklp")
98 (setq ps-lpr-command "/usr/bin/gtklp")
100 ;; On utilise Mozilla Firefox
101 (defun browse-url-firefox-new-tab (url &optional new-window)
102 "Open URL in a new tab in Firefox."
103 ;; (interactive (browse-url-interactive-arg "URL: "))
104 (let ((cmd (shell-command-to-string
105 (concat "mozilla-firefox -a firefox -remote 'openURL("
106 url ",new-tab)' > /dev/null"))))
107 (unless (string= "" cmd)
108 (message "Starting Firefox...")
109 (start-process (concat "firefox " url) nil "/bin/sh" "-c"
110 (concat "mozilla-firefox " url "|| true"))
111 (message "Starting Firefox...done"))))
113 (setq browse-url-browser-function 'browse-url-firefox-new-tab)
119 (global-set-key "\C-cp" 'ps-print-buffer-with-faces)
122 ;; | Configuration pour les différants modes
126 ;;(setq tla-arch-branch 'baz)
127 ;;(tla-insinuate-gnus)
130 (setq ispell-program-name "aspell")
131 (setq ispell-dictionary "french")
133 ;; Pour JDE (Bug dans la sid)
134 (setq global-senator-minor-mode t)
137 (setq tex-dvi-view-command "evince")
138 (setq LaTeX-verbatim-environments (quote ("verbatim" "verbatim*" "lstlisting")))
139 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
142 (setq find-file-run-dired t)
143 (setq dired-listing-switches "-l")
144 (setq dired-recursive-deletes 'top)
147 (defalias 'perl-mode 'cperl-mode)
150 (setq-default indent-tabs-mode nil)
152 ;; Toujours avoir nouvelle ligne en fin de fichier
153 (setq require-final-newline t)
155 ;; Configuration de debian-changelog
156 (setq debian-changelog-full-name "Olivier Tétard")
157 (setq debian-changelog-mailing-address "toutoune25@free.fr")
159 (setq safe-local-variable-values
160 (quote ((TeX-PDF-mode . PDF))))
162 ;; Stolen from http://xemacs.seanm.ca/lisp/dired-extras.el
163 (defun dired-do-apply-function (func)
164 "Apply an interactive lisp function to all the marked files.
165 The function is not passed any arguments. The function honours restrictions."
166 (interactive "aFunction: ")
168 (dolist (file (dired-get-marked-files))
169 (message "Processing %s..." file)
170 (set-buffer (find-file-noselect file))
171 (goto-char (point-min))
176 (custom-set-variables
177 ;; custom-set-variables was added by Custom.
178 ;; If you edit it by hand, you could mess it up, so be careful.
179 ;; Your init file should contain only one such instance.
180 ;; If there is more than one, they won't work right.
181 '(display-time-24hr-format t)
182 '(mail-yank-prefix "> ")
183 '(muse-file-extension "muse")
184 '(muse-html-charset-default "utf-8")
185 '(muse-html-encoding-default (quote utf-8))
186 '(muse-html-meta-content-encoding (quote utf-8))
187 '(muse-html-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" charset=\"utf-8\" media=\"all\" href=\"/style.css\" />")
188 '(muse-mode-auto-p nil)
189 '(muse-mode-hook (quote (footnote-mode muse-wiki-update-custom-values)))
190 '(muse-publish-desc-transforms (quote (muse-wiki-publish-pretty-title muse-wiki-publish-pretty-interwiki muse-publish-escape-specials-in-string)))
191 '(muse-wiki-publish-small-title-words (quote ("the" "and" "at" "on" "of" "for" "in" "an" "a" "page" "anime")))
192 '(muse-xhtml-footer "~/documents/wiki/common/footer.html")
193 '(muse-xhtml-header "~/documents/wiki/common/header.html")
194 '(safe-local-variable-values (quote ((TeX-PDF-mode . PDF)))))
196 ;; custom-set-faces was added by Custom.
197 ;; If you edit it by hand, you could mess it up, so be careful.
198 ;; Your init file should contain only one such instance.
199 ;; If there is more than one, they won't work right.
200 '(erc-current-nick-face ((t (:foreground "red" :slant oblique :background: "yellow"))))
201 '(highlight-current-line-face ((t (:background "#6699cc"))))
202 '(muse-bad-link-face ((t (:foreground "DeepPink" :underline "DeepPink" :weight bold))))
203 '(muse-link-face ((t (:foreground "blue" :underline "blue" :weight bold)))))