Mercurial > dotfiles
comparison .elisp/settings/40.modes.el @ 224:7ca719e40c58
modes: enable Go mode if it can be found
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 20 Sep 2010 07:35:29 -0500 |
parents | 739d96003993 |
children | 31f86a5707ee |
comparison
equal
deleted
inserted
replaced
223:739d96003993 | 224:7ca719e40c58 |
---|---|
23 (interactive) | 23 (interactive) |
24 (make-variable-buffer-local 'af-cleanup-whitespace) | 24 (make-variable-buffer-local 'af-cleanup-whitespace) |
25 (set-variable 'af-cleanup-whitespace nil)) | 25 (set-variable 'af-cleanup-whitespace nil)) |
26 (add-hook 'rst-mode-hook 'af-no-clean-whitespace) | 26 (add-hook 'rst-mode-hook 'af-no-clean-whitespace) |
27 (add-hook 'makefile-mode-hook 'af-no-clean-whitespace) | 27 (add-hook 'makefile-mode-hook 'af-no-clean-whitespace) |
28 | |
29 | |
30 (defun af-go-hook () | |
31 ;; enable tabs | |
32 (setq tab-width 2) | |
33 (setq-default indent-tabs-mode t)) | |
34 | |
35 | |
36 (let ((go-emacs (concat (getenv "GOROOT") "/misc/emacs"))) | |
37 (message (concat go-emacs "/go-mode.el")) | |
38 (if (file-exists-p (concat go-emacs "/go-mode.el")) | |
39 (progn (add-to-list 'load-path go-emacs) | |
40 (require 'go-mode-load) | |
41 (add-hook 'go-mode-hook 'af-go-hook)) | |
42 (message "Go appears to not be installed, skipping go-mode."))) | |
28 | 43 |
29 (autoload 'js2-mode "js2" nil t) | 44 (autoload 'js2-mode "js2" nil t) |
30 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | 45 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) |
31 (add-hook 'js2-mode-hook 'af-tab-fix) | 46 (add-hook 'js2-mode-hook 'af-tab-fix) |
32 | 47 |