|
Revision 187, 1.4 kB
(checked in by docwhat, 20 months ago)
|
|
mutt mode
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | (add-to-list 'auto-mode-alist '("\\.tar.gz\\'" . archive-mode)) |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | (add-to-list 'auto-mode-alist '("\\.xpi\\'" . archive-mode)) |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | (add-to-list 'auto-mode-alist |
|---|
| 11 | (cons (concat "\\." (regexp-opt '("xhtml" "htm" "pt" "xul" "dtml") t) "\\'") |
|---|
| 12 | 'html-mode)) |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | (if (fboundp 'nxml-mode) |
|---|
| 16 | (progn |
|---|
| 17 | (require 'fmode) |
|---|
| 18 | (fmode-replace-default-mode 'xml-mode 'nxml-mode) |
|---|
| 19 | (fmode-replace-default-mode 'sgml-mode 'nxml-mode) |
|---|
| 20 | (fmode-replace-default-mode 'html-mode 'nxml-mode) |
|---|
| 21 | |
|---|
| 22 | ) |
|---|
| 23 | ) |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | (add-to-list 'auto-mode-alist '("/_" . sh-mode)) |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | (defun mutt-mode-hook () |
|---|
| 30 | (turn-on-auto-fill) |
|---|
| 31 | (turn-on-font-lock) |
|---|
| 32 | (flush-lines "^\\(> \n\\)*> -- \n\\(\n?> .*\\)*") |
|---|
| 33 | (not-modified) |
|---|
| 34 | (mail-text) |
|---|
| 35 | (setq make-backup-files nil) |
|---|
| 36 | ) |
|---|
| 37 | (or (assoc "mutt-" auto-mode-alist) |
|---|
| 38 | (setq auto-mode-alist (cons '("mutt-" . mail-mode) auto-mode-alist))) |
|---|
| 39 | (add-hook 'mail-mode-hook 'mutt-mode-hook) |
|---|