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)
37 ;; | Couleurs et apparence
44 (if (>= emacs-major-version 23)
45 (set-frame-font "DejaVu Sans Mono-10"))
51 (server-start) ; Multi-tty powa !
52 (ido-mode t) ; Utilisation du mode ido
53 (setq auto-save-interval 1200) ; Autosave
54 (setq scroll-step 2) ; On se decale de 2 lignes quand on change de page
55 (delete-selection-mode t) ; On peut supprimer une selection
56 (fset 'yes-or-no-p 'y-or-n-p) ; yes == y
57 (show-paren-mode t) ; On affiche les parentheses liées
58 (setq display-time-24hr-format t) ; Heure au format 24h
59 (display-time) ; On affiche l'heure dans la barre
60 (setq visible-bell t) ; On desactive les beeps
61 (setq inhibit-startup-screen t) ; On désactive le splash screen
62 (setq use-file-dialog nil) ; Désactivation des boites de
63 (setq use-dialog-box nil) ; fichiers GTK+
64 (setq scroll-bar-mode 'right)
65 (column-number-mode 1)
67 ;; Configuration d'uniquify
68 (setq uniquify-buffer-name-style 'reverse)
69 (setq uniquify-separator "|")
70 (setq uniquify-after-kill-buffer-p t)
71 (setq uniquify-ignore-buffers-re "^\\*")
73 ;; Les copiers/coller doivent aller dans le clipboard de l'OS
74 (setq x-select-enable-clipboard t)
75 (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
77 (setq auto-mode-alist (cons '(".mail" . message-mode) auto-mode-alist))
79 ;; Quand vous recevez un fichier .txt d'une machine dos/windows il est
80 ;; très énervant de voir les ^M a chaque fin de ligne, utiliser M-x
81 ;; dos-unix pour vous en débarrasser. (J. Danjou)
84 (goto-char (point-min))
85 (while (search-forward "\r" nil t) (replace-match "")))
89 ;; (read-abbrev-file "~/.abbrev_defs")
91 (global-set-key (quote [S-tab]) (quote dabbrev-expand))
94 (set major-mode 'text-mode)
95 (add-hook 'text-mode-hook 'turn-on-auto-fill)
97 ;; Enable longlines-mode for LaTeX files
98 (add-hook 'latex-mode-hook 'longlines-mode)
104 (global-set-key "\C-cp" 'ps-print-buffer-with-faces)
107 ;; | Configuration pour les différants modes
111 (setq ispell-program-name "aspell")
112 (setq ispell-dictionary "french")
115 (setq tex-dvi-view-command "evince")
116 (setq LaTeX-verbatim-environments (quote ("verbatim" "verbatim*" "lstlisting")))
117 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
120 (setq find-file-run-dired t)
121 (setq dired-listing-switches "-l")
122 (setq dired-recursive-deletes 'top)
125 (defalias 'perl-mode 'cperl-mode)
128 (setq-default indent-tabs-mode nil)
130 ;; Toujours avoir nouvelle ligne en fin de fichier
131 (setq require-final-newline t)
133 ;; Configuration de debian-changelog
134 (setq debian-changelog-full-name "Olivier Tétard")
135 (setq debian-changelog-mailing-address "olivier.tetard@miskin.fr")
137 (setq safe-local-variable-values
138 (quote ((TeX-PDF-mode . PDF))))
140 ;; Stolen from http://xemacs.seanm.ca/lisp/dired-extras.el
141 (defun dired-do-apply-function (func)
142 "Apply an interactive lisp function to all the marked files.
143 The function is not passed any arguments. The function honours restrictions."
144 (interactive "aFunction: ")
146 (dolist (file (dired-get-marked-files))
147 (message "Processing %s..." file)
148 (set-buffer (find-file-noselect file))
149 (goto-char (point-min))
154 (setq-default c-basic-offset 8)
155 (setq-default indent-tabs-mode t)
158 (push (expand-file-name "~/.elisp/twittering-mode") load-path)
159 (require 'twittering-mode)
160 (setq twittering-use-master-password t)
161 (setq twittering-icon-mode t)
162 (setq twittering-timer-interval 300)
163 (setq twittering-url-show-status nil)
164 (add-hook 'twittering-new-tweets-hook
166 (let ((n twittering-new-tweets-count))
167 (start-process "twittering-notify" nil "notify-send"
168 "-i" "/usr/share/pixmaps/gnome-emacs.png"
170 (format "You have %d new tweet%s"
171 n (if (> n 1) "s" ""))))))
175 (custom-set-variables
176 ;; custom-set-variables was added by Custom.
177 ;; If you edit it by hand, you could mess it up, so be careful.
178 ;; Your init file should contain only one such instance.
179 ;; If there is more than one, they won't work right.
180 '(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"))))
181 '(canlock-password "a29a3189d5be23f38adc9d2627e77c898e00cde1")
182 '(display-time-24hr-format t)
183 '(inhibit-startup-screen t)
184 '(mail-yank-prefix "> ")
185 '(muse-file-extension "muse")
186 '(muse-html-charset-default "utf-8")
187 '(muse-html-encoding-default (quote utf-8))
188 '(muse-html-meta-content-encoding (quote utf-8))
189 '(muse-html-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" charset=\"utf-8\" media=\"all\" href=\"/style.css\" />")
190 '(muse-mode-auto-p nil)
191 '(muse-publish-desc-transforms (quote (muse-wiki-publish-pretty-title muse-wiki-publish-pretty-interwiki muse-publish-escape-specials-in-string)))
192 '(muse-wiki-publish-small-title-words (quote ("the" "and" "at" "on" "of" "for" "in" "an" "a" "page" "anime")))
193 '(muse-xhtml-footer "~/documents/wiki/common/footer.html")
194 '(muse-xhtml-header "~/documents/wiki/common/header.html")
195 '(safe-local-variable-values (quote ((sgml-local-ecat-files) (sgml-local-catalogs) (sgml-exposed-tags) (sgml-default-dtd-file) (sgml-parent-document) (sgml-indent-data . t) (sgml-indent-step . 2) (sgml-always-quote-attributes . t) (sgml-minimize-attributes) (sgml-shorttag . t) (sgml-omittag . t) (TeX-PDF-mode . "PDF") (TeX-PDF-mode . PDF)))))
197 ;; custom-set-faces was added by Custom.
198 ;; If you edit it by hand, you could mess it up, so be careful.
199 ;; Your init file should contain only one such instance.
200 ;; If there is more than one, they won't work right.
201 '(erc-current-nick-face ((t (:foreground "red" :slant oblique :background: "yellow"))))
202 '(highlight-current-line-face ((t (:background "#6699cc"))))
203 '(muse-bad-link-face ((t (:foreground "DeepPink" :underline "DeepPink" :weight bold))))
204 '(muse-link-face ((t (:foreground "blue" :underline "blue" :weight bold)))))