summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-08-24 17:56:55 -0700
committerFranck Cuny <franck@fcuny.net>2021-08-24 17:56:55 -0700
commitab41d9cdcad99b121b206b9aab56e9db387f669a (patch)
treebeea57933fe419a8ac6dfc146d08ce647196690c /emacs
parentemacs: fix hook syntax for lsp-mode (diff)
downloademacs.d-ab41d9cdcad99b121b206b9aab56e9db387f669a.tar.gz
emacs: move function for go-mode-compile
The function needs to be defined before we use it in the `use-package`
for go-mode.
Diffstat (limited to '')
-rw-r--r--emacs/custom/fcuny-prog.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/emacs/custom/fcuny-prog.el b/emacs/custom/fcuny-prog.el
index 1c341e1..d291f5d 100644
--- a/emacs/custom/fcuny-prog.el
+++ b/emacs/custom/fcuny-prog.el
@@ -113,6 +113,12 @@
   :config
   (add-hook 'makefile-mode-hook (lambda () (setq-local tab-width 2))))
 
+
+(defun fcuny/setup-go-mode-compile ()
+  (if (not (string-match "go" compile-command))
+      (set (make-local-variable 'compile-command)
+           "go build -v")))
+
 (use-package go-mode
   :ensure t
   :hook ((before-save . lsp-format-buffer)
@@ -137,11 +143,6 @@
   :bind (:map puppet-mode-map
               ("C-c |" . puppet-align-block)))
 
-(defun fcuny/setup-go-mode-compile ()
-  (if (not (string-match "go" compile-command))
-      (set (make-local-variable 'compile-command)
-           "go build -v")))
-
 (use-package compile
   :ensure nil
   :custom