diff .elisp/settings/40.modes.el @ 277:884f7f932a83

emacs go: move go config to a new file This uses some clever shell tricks to identify the location (if any) of the go installation and gocode and load their supporting packages if available.
author Augie Fackler <raf@durin42.com>
date Fri, 27 Apr 2012 16:50:05 -0500
parents 8109c1d949c8
children 7a99481ab888
line wrap: on
line diff
--- a/.elisp/settings/40.modes.el
+++ b/.elisp/settings/40.modes.el
@@ -27,25 +27,6 @@ point."
 (add-hook 'rst-mode-hook 'af-no-clean-whitespace)
 (add-hook 'makefile-mode-hook 'af-no-clean-whitespace)
 
-
-(defun af-go-hook ()
-  ;; enable tabs
-  (setq tab-width 2)
-  (setq-default indent-tabs-mode t)
-  (make-variable-buffer-local 'whitespace-style)
-  (setq whitespace-style '(trailing lines-tail indentation trailing empty))
-  (message "Fixed whitespace style")
-  )
-
-
-(let ((go-emacs (concat (getenv "GOROOT") "/misc/emacs")))
-  (message (concat go-emacs "/go-mode.el"))
-  (if (file-exists-p (concat go-emacs "/go-mode.el"))
-      (progn (add-to-list 'load-path go-emacs)
-             (require 'go-mode-load)
-             (add-hook 'go-mode-hook 'af-go-hook))
-    (message "Go appears to not be installed, skipping go-mode.")))
-
 (autoload 'js2-mode "js2" nil t)
 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
 (add-hook 'js2-mode-hook 'af-tab-fix)