From b023cf6107a1b6bcafd651ad8a97ebea78cfc06f Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 9 Mar 2016 15:06:31 +0100 Subject: [PATCH] cmd/guru: emacs: update scope documentation Also fix a typo in the tool's help string. Change-Id: I54a9ed4a5515b137b0fbf1b2391dd6fa84b2d2d8 Reviewed-on: https://go-review.googlesource.com/20474 Reviewed-by: Alan Donovan --- cmd/guru/go-guru.el | 20 +++++++++----------- cmd/guru/main.go | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/cmd/guru/go-guru.el b/cmd/guru/go-guru.el index de78d7a9..9284a08a 100644 --- a/cmd/guru/go-guru.el +++ b/cmd/guru/go-guru.el @@ -68,19 +68,17 @@ ;;;###autoload (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. -The scope specifies a set of arguments, separated by spaces. -It may be: -1) a set of packages whose main functions will be analyzed. -2) a list of *.go filenames; they will treated like as a single - package (see #3). -3) a single package whose main function and/or Test* functions - will be analyzed. +The scope restricts analysis to the specified packages. +Its value is a comma-separated list of patterns of these forms: + golang.org/x/tools/cmd/guru # a single package + golang.org/x/tools/... # all packages beneath dir + ... # the entire workspace. -In the common case, this is similar to the argument(s) you would -specify to 'go build'." +A pattern preceded by '-' is negative, so the scope + encoding/...,-encoding/xml +matches all encoding packages except encoding/xml." (interactive) (let ((scope (read-from-minibuffer "Go guru scope: " go-guru-scope diff --git a/cmd/guru/main.go b/cmd/guru/main.go index 97d7acac..b99b0584 100644 --- a/cmd/guru/main.go +++ b/cmd/guru/main.go @@ -91,7 +91,7 @@ The -scope flag restricts analysis to the specified packages. ... # the entire workspace. A pattern preceded by '-' is negative, so the scope encoding/...,-encoding/xml - matches all encoding packages except encoding/xml: + matches all encoding packages except encoding/xml. User manual: http://golang.org/s/oracle-user-manual