root / trunk / packages / emacs-base / .emacs.d / common / filetypes.el

Revision 187, 1.4 kB (checked in by docwhat, 20 months ago)

mutt mode

Line 
1;;;; Various extensions...
2
3;; This is missing for some reason....
4(add-to-list 'auto-mode-alist '("\\.tar.gz\\'" . archive-mode))
5
6;; Mozilla Extensions
7(add-to-list 'auto-mode-alist '("\\.xpi\\'"    . archive-mode))
8
9;; Additional html extensions
10(add-to-list 'auto-mode-alist
11             (cons (concat "\\." (regexp-opt '("xhtml" "htm" "pt" "xul" "dtml") t) "\\'")
12                   'html-mode))
13
14;; If we have nxml, switch to that
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;; ZSH completion funcs
26(add-to-list 'auto-mode-alist '("/_" . sh-mode))
27
28;; Mutt mode hooks - from http://fsinfo.cs.uni-sb.de/~abe/mutt/
29(defun mutt-mode-hook ()
30  (turn-on-auto-fill) ;;; Auto-Fill is necessary for mails
31  (turn-on-font-lock) ;;; Font-Lock is always cool *g*
32  (flush-lines "^\\(> \n\\)*> -- \n\\(\n?> .*\\)*") ;;; Kills quoted sigs.
33  (not-modified)      ;;; We haven't changed the buffer, haven't we? *g*
34  (mail-text)         ;;; Jumps to the beginning of the mail text
35  (setq make-backup-files nil) ;;; No backups necessary.
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)
Note: See TracBrowser for help on using the browser.