With a little side of applesauce...

Tuesday, January 30, 2007

emacs set default major mode based on file extension

Placing this in your ~/.emacs file will load a specific major mode based on the file extension:

;; apache mode to edit  config files.
(autoload 'apache-mode "apache-mode" "Apache Major Mode" t)
(setq auto-mode-alist
(cons '("\.conf$" . apache-mode) auto-mode-alist))

No comments: