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

cmd/guru: add menu to Emacs

Change-Id: Ife18d22f8f9b81a0e898a2b5da202feb1df23852
Reviewed-on: https://go-review.googlesource.com/24832
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Alan Donovan 2016-07-08 14:41:07 -04:00
parent 527b253f58
commit 2b3249681b

View File

@ -22,6 +22,7 @@
;;; Code: ;;; Code:
(require 'compile) (require 'compile)
(require 'easymenu)
(require 'go-mode) (require 'go-mode)
(require 'json) (require 'json)
(require 'simple) (require 'simple)
@ -94,6 +95,25 @@
(define-key go-mode-map (kbd "C-c C-o") #'go-guru-map) (define-key go-mode-map (kbd "C-c C-o") #'go-guru-map)
(easy-menu-define go-guru-mode-menu go-mode-map
"Menu for Go Guru."
'("Guru"
["Jump to Definition" go-guru-definition t]
["Show Referrers" go-guru-referrers t]
["Show Free Names" go-guru-freevars t]
["Describe Expression" go-guru-describe t]
["Show Implements" go-guru-implements t]
"---"
["Show Callers" go-guru-callers t]
["Show Callees" go-guru-callees t]
["Show Callstack" go-guru-callstack t]
"---"
["Show Points-To" go-guru-pointsto t]
["Show Which Errors" go-guru-whicherrs t]
["Show Channel Peers" go-guru-peers t]
"---"
["Set pointer analysis scope..." go-guru-set-scope t]))
;;;###autoload ;;;###autoload
(defun go-guru-set-scope () (defun go-guru-set-scope ()
"Set the scope for the Go guru, prompting the user to edit the previous scope. "Set the scope for the Go guru, prompting the user to edit the previous scope.