[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 520f070 182/495: allow users to customize path of
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 520f070 182/495: allow users to customize path of 'go' tool. |
Date: |
Sat, 7 Aug 2021 09:05:09 -0400 (EDT) |
branch: elpa/go-mode
commit 520f0701cebb0301ca49de8ba61f6c3164ff6e44
Author: Alan Donovan <adonovan@google.com>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
allow users to customize path of 'go' tool.
Some users have multiple Go development trees and invoke the
'go' tool via a wrapper that sets GOROOT and GOPATH based on
the current directory. Such users should customize go-command
to point to the wrapper script.
---
go-mode.el | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 7f082c0..438fe92 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -159,6 +159,14 @@
:type 'hook
:group 'go)
+(defcustom go-command "go"
+ "The 'go' command. Some users have multiple Go development
+trees and invoke the 'go' tool via a wrapper that sets GOROOT and
+GOPATH based on the current directory. Such users should
+customize this variable to point to the wrapper script."
+ :type 'string
+ :group 'go)
+
(defface go-coverage-untracked
'((t (:foreground "#505050")))
"Coverage color of untracked code."
@@ -852,7 +860,8 @@ uncommented, otherwise a new import will be added."
('none (insert "\nimport (\n\t" line "\n)\n")))))))
(defun go-root-and-paths ()
- (let* ((output (split-string (shell-command-to-string "go env GOROOT
GOPATH") "\n"))
+ (let* ((output (split-string (shell-command-to-string (concat go-command "
env GOROOT GOPATH"))
+ "\n"))
(root (car output))
(paths (split-string (cadr output) ":")))
(append (list root) paths)))
@@ -911,9 +920,10 @@ If IGNORE-CASE is non-nil, the comparison is
case-insensitive."
(if (string= (file-truename (match-string 1 line))
(file-truename buffer-file-name))
(string-to-number (match-string 2 line)))))
(split-string (shell-command-to-string
- (if (string-match "_test\.go$"
buffer-file-truename)
- "go test -c"
- "go build -o /dev/null")) "\n")))))
+ (concat go-command
+ (if (string-match "_test\.go$"
buffer-file-truename)
+ " test -c"
+ " build -o /dev/null"))) "\n")))))
(defun go-remove-unused-imports (arg)
"Removes all unused imports. If ARG is non-nil, unused imports
- [nongnu] elpa/go-mode f79120b 166/495: add support for mode=count coverage, (continued)
- [nongnu] elpa/go-mode f79120b 166/495: add support for mode=count coverage, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1d5ddda 167/495: add coverage count as a tooltip, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode eaa47c2 165/495: remove old overlays, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 210bb30 174/495: go-coverage: only update max-count if it's a count for the file we're interested in, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 38f2465 164/495: display a helpful prompt in go-coverage, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9db834a 178/495: changes from CL, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f1c266d 172/495: enable godef to work in coverage buffers, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4b1c93f 173/495: use error instead of message in godef--call, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 68e9626 177/495: fully implement prog-mode for older emacsen, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7694963 181/495: detect stale coverage reports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 520f070 182/495: allow users to customize path of 'go' tool.,
ELPA Syncer <=
- [nongnu] elpa/go-mode 303ba8c 180/495: reformat code, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ab6853d 183/495: use (buffer-base-buffer) instead of own local variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode de4e59a 194/495: require at least one space after "type", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9fde5fb 189/495: godef-jump: support jumping to package directories, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7878794 187/495: send the correct content-length to the playground, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 68588e1 196/495: Support ff-find-other-file, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a480b9a 205/495: more compact implementation of go--delete-whole-line, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9d0732c 201/495: refactor godef error handling, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f664cff 197/495: correctly fontify methods when go-fontify-function-calls is nil, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 10281b7 202/495: add godoc-at-point, ELPA Syncer, 2021/08/07