1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:14:42 -07:00

cmd/guru: emacs: allow passing tags to guru

Change-Id: I2e49d050add1f764a0e41300b2cca8da699f418a
Reviewed-on: https://go-review.googlesource.com/20302
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Dominik Honnef 2016-03-07 02:24:43 +01:00 committed by Alan Donovan
parent 2336c53cf0
commit 459f0c0f73

View File

@ -45,6 +45,11 @@
nil nil
"History of values supplied to `go-guru-set-scope'.") "History of values supplied to `go-guru-set-scope'.")
(defcustom go-guru-build-tags ""
"Build tags passed to guru."
:type 'string
:group 'go-guru)
;; Extend go-mode-map. ;; Extend go-mode-map.
(let ((m (define-prefix-command 'go-guru-map))) (let ((m (define-prefix-command 'go-guru-map)))
(define-key m "d" #'go-guru-describe) (define-key m "d" #'go-guru-describe)
@ -131,7 +136,8 @@ a scope if not already set. Return the output buffer."
(erase-buffer) (erase-buffer)
(go-guru--insert-modified-files) (go-guru--insert-modified-files)
(let* ((args (append (list "-modified" (let* ((args (append (list "-modified"
"-scope" go-guru-scope) "-scope" go-guru-scope
"-tags" go-guru-build-tags)
flags flags
(list mode posn)))) (list mode posn))))
;; Log the command to *Messages*, for debugging. ;; Log the command to *Messages*, for debugging.