cmd/guru: emacs: add go-guru-debug variable
Don't print debug messages unless go-guru-debug is set. Change-Id: I1332a0b10eba1d1107ef987734b2b787ae28d9c2 Reviewed-on: https://go-review.googlesource.com/20432 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
b023cf6107
commit
c5b51756ce
|
|
@ -50,6 +50,11 @@
|
|||
:type 'string
|
||||
:group 'go-guru)
|
||||
|
||||
(defcustom go-guru-debug nil
|
||||
"Print debug messages when running guru."
|
||||
:type 'boolean
|
||||
:group 'go-guru)
|
||||
|
||||
;; Extend go-mode-map.
|
||||
(let ((m (define-prefix-command 'go-guru-map)))
|
||||
(define-key m "d" #'go-guru-describe)
|
||||
|
|
@ -133,9 +138,10 @@ a scope if not already set. Return the output buffer."
|
|||
flags
|
||||
(list mode posn))))
|
||||
;; Log the command to *Messages*, for debugging.
|
||||
(message "Command: %s:" args)
|
||||
(message nil) ; clears/shrinks minibuffer
|
||||
(message "Running guru %s..." mode)
|
||||
(when go-guru-debug
|
||||
(message "Command: %s:" args)
|
||||
(message nil) ; clears/shrinks minibuffer
|
||||
(message "Running guru %s..." mode))
|
||||
;; Use dynamic binding to modify/restore the environment
|
||||
(let* ((process-environment (list* goroot-env gopath-env process-environment))
|
||||
(c-p-args (append (list (point-min)
|
||||
|
|
|
|||
Loading…
Reference in New Issue