From: Ramakrishnan Muthukrishnan <rama.krishnan@concur.com>
Date: Mon, 16 Mar 2015 16:10:53 +0000 (+0530)
Subject: go mode, gofmt save hook
X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/bcase/nxhtml.html?a=commitdiff_plain;h=da4b7f3e31bd3b4f353a06beca9dd23dee4e5f50;p=.emacs.d.git

go mode, gofmt save hook
---

diff --git a/init.el b/init.el
index be9b90b..8a4d472 100644
--- a/init.el
+++ b/init.el
@@ -38,7 +38,7 @@
   (package-refresh-contents))
 
 ;; make sure my list of packages are installed
-(setq package-list '(rust-mode haskell-mode clojure-mode ghc restclient tangotango-theme cider))
+(setq package-list '(go-mode rust-mode haskell-mode clojure-mode ghc restclient tangotango-theme cider))
 
 ; install the missing packages
 (dolist (package package-list)
@@ -119,3 +119,6 @@
 (defun my-haskell-mode-hook ()
    (local-set-key "\C-cl" 'hs-lint))
 (add-hook 'haskell-mode-hook 'my-haskell-mode-hook)
+
+;; gofmt
+(add-hook 'before-save-hook #'gofmt-before-save)