[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 01dff21 358/495: cmd/guru: emacs: package.el compa
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 01dff21 358/495: cmd/guru: emacs: package.el compatibility changes |
Date: |
Sat, 7 Aug 2021 09:05:47 -0400 (EDT) |
branch: elpa/go-mode
commit 01dff21f4b3e75cf71bb51d6bb29927497f67356
Author: Konstantin Shaposhnikov <k.shaposhnikov@gmail.com>
Commit: Dominik Honnef <dominik@honnef.co>
cmd/guru: emacs: package.el compatibility changes
Make go-guru compatible with package.el prior to uploading this pacakge to
MELPA.
Also add ;;;###autoload magic comments, so that the go-guru-xxx commands can
be used without need to explicitly (require 'go-guru) first.
Change-Id: I21c7f5f354fb7b39877a05c2a9ffecd02ab022f6
Reviewed-on: https://go-review.googlesource.com/19789
Reviewed-by: Dominik Honnef <dominik@honnef.co>
Reviewed-by: Alan Donovan <adonovan@google.com>
---
guru_import/cmd/guru/{guru.el => go-guru.el} | 47 ++++++++++++++++++++++------
1 file changed, 37 insertions(+), 10 deletions(-)
diff --git a/guru_import/cmd/guru/guru.el b/guru_import/cmd/guru/go-guru.el
similarity index 91%
rename from guru_import/cmd/guru/guru.el
rename to guru_import/cmd/guru/go-guru.el
index ae55cde..bd69384 100644
--- a/guru_import/cmd/guru/guru.el
+++ b/guru_import/cmd/guru/go-guru.el
@@ -1,13 +1,25 @@
-;;;
-;;; Integration of the Go 'guru' analysis tool into Emacs.
-;;;
-;;; To install the Go guru, run:
-;;; $ go get golang.org/x/tools/cmd/guru
-;;;
-;;; Load this file into Emacs and set go-guru-scope to your
-;;; configuration. Then, find a file of Go source code, enable
-;;; go-guru-mode, select an expression of interest, and press `C-c C-o d'
-;;; (for "describe") or run one of the other go-guru-xxx commands.
+;;; go-guru.el --- Integration of the Go 'guru' analysis tool into Emacs.
+
+;; Copyright 2016 The Go Authors. All rights reserved.
+;; Use of this source code is governed by a BSD-style
+;; license that can be found in the LICENSE file.
+
+;; Version: 0.1
+;; Package-Requires: ((go-mode "1.3.1") (cl-lib "0.5"))
+;; Keywords: tools
+
+;;; Commentary:
+
+;; To install the Go guru, run:
+;;
+;; $ go get golang.org/x/tools/cmd/guru
+;;
+;; Load this file into Emacs and set go-guru-scope to your
+;; configuration. Then, find a file of Go source code,
+;; select an expression of interest, and press `C-c C-o d' (for "describe")
+;; or run one of the other go-guru-xxx commands.
+
+;;; Code:
(require 'compile)
(require 'go-mode)
@@ -55,6 +67,7 @@
;; would be having two different functions, but then we can't
;; automatically call it when no scope has been set. Also it wouldn't
;; easily allow specifying more than one file/package.
+;;;###autoload
(defun go-guru-set-scope ()
"Set the scope for the Go guru, prompting the user to edit the
previous scope.
@@ -213,27 +226,32 @@ set the point to it, switching the current buffer."
(forward-line (1- (string-to-number (cadr file-line-pos))))
(forward-char (1- (string-to-number (caddr file-line-pos))))))
+;;;###autoload
(defun go-guru-callees ()
"Show possible callees of the function call at the current point."
(interactive)
(go-guru--run "callees" t))
+;;;###autoload
(defun go-guru-callers ()
"Show the set of callers of the function containing the current point."
(interactive)
(go-guru--run "callers" t))
+;;;###autoload
(defun go-guru-callgraph ()
"Show the callgraph of the current program."
(interactive)
(go-guru--run "callgraph" t))
+;;;###autoload
(defun go-guru-callstack ()
"Show an arbitrary path from a root of the call graph to the
function containing the current point."
(interactive)
(go-guru--run "callstack" t))
+;;;###autoload
(defun go-guru-definition ()
"Jump to the definition of the selected identifier."
(interactive)
@@ -246,39 +264,46 @@ function containing the current point."
(go-guru--goto-pos (cdr (assoc 'objpos res)))
(message "%s" desc)))
+;;;###autoload
(defun go-guru-describe ()
"Describe the selected syntax, its kind, type and methods."
(interactive)
(go-guru--run "describe"))
+;;;###autoload
(defun go-guru-pointsto ()
"Show what the selected expression points to."
(interactive)
(go-guru--run "pointsto" t))
+;;;###autoload
(defun go-guru-implements ()
"Describe the 'implements' relation for types in the package
containing the current point."
(interactive)
(go-guru--run "implements"))
+;;;###autoload
(defun go-guru-freevars ()
"Enumerate the free variables of the current selection."
(interactive)
(go-guru--run "freevars"))
+;;;###autoload
(defun go-guru-peers ()
"Enumerate the set of possible corresponding sends/receives for
this channel receive/send operation."
(interactive)
(go-guru--run "peers" t))
+;;;###autoload
(defun go-guru-referrers ()
"Enumerate all references to the object denoted by the selected
identifier."
(interactive)
(go-guru--run "referrers"))
+;;;###autoload
(defun go-guru-whicherrs ()
"Show globals, constants and types to which the selected
expression (of type 'error') may refer."
@@ -286,3 +311,5 @@ expression (of type 'error') may refer."
(go-guru--run "whicherrs" t))
(provide 'go-guru)
+
+;;; go-guru.el ends here
- [nongnu] elpa/go-mode 50bceae 326/495: Use HTTPS with go-play-region, (continued)
- [nongnu] elpa/go-mode 50bceae 326/495: Use HTTPS with go-play-region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 49521d5 310/495: Add go-reset-gopath, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b767500 325/495: Set compilation-error-screen-columns to nil, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 15ea9a4 320/495: No longer provide a default in M-x godoc, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 22cbf11 321/495: Support unsaved buffers with gogetdoc, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0b25cb5 327/495: Generate HTTPS URL for playground entry, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f63d982 323/495: Make godoc interactive again, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 218d8c5 346/495: cmd/oracle: emacs: look for oracle on $PATH and nowhere else, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode aa733d8 339/495: go.tools/oracle: turn emacs integration into minor-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode cbf7274 343/495: x/tools/oracle: add whicherrs query mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 01dff21 358/495: cmd/guru: emacs: package.el compatibility changes,
ELPA Syncer <=
- [nongnu] elpa/go-mode dc424ef 361/495: cmd/guru: emacs: add default key binding for whicherrs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6bfbd41 371/495: cmd/guru: emacs: report most specific element in expand-region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9753f6a 342/495: go.tools: use golang.org/x/... import paths, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode aa9a40c 351/495: cmd/guru: in Emacs, change 'definition' to jump directly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 95e7a6f 377/495: cmd/guru: emacs: Use cl-lib.el instead of cl.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2e9ec69 376/495: cmd/guru: update Emacs installation documentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 37f595f 365/495: cmd/guru: emacs: support running on nameless buffers, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9d5f10a 366/495: cmd/guru: emacs: store output in separate buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6a92c3b 349/495: cmd/guru: clean ups to command-line interface, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b2837e7 345/495: cmd/oracle: expect oracle binary beneath $GOBIN, $GOPATH/bin, or $GOROOT/bin, ELPA Syncer, 2021/08/07