diff --git a/go-guru.el b/go-guru.el index c538680d..9a62fb74 100644 --- a/go-guru.el +++ b/go-guru.el @@ -1,4 +1,4 @@ -;;; go-guru.el --- Integration of the Go 'guru' analysis tool into Emacs. +;;; go-guru.el --- Integration of the Go 'guru' analysis tool into Emacs. -*- lexical-binding: t; -*- ;; Copyright 2016 The Go Authors. All rights reserved. ;; Use of this source code is governed by a BSD-style @@ -155,7 +155,7 @@ Its value is a comma-separated list of patterns of these forms: golang.org/x/tools/... # all packages beneath dir ... # the entire workspace. -A pattern preceded by '-' is negative, so the scope +A pattern preceded by `-' is negative, so the scope encoding/...,-encoding/xml matches all encoding packages except encoding/xml." (interactive) @@ -396,7 +396,7 @@ function containing the current point." ;;;###autoload (defun go-guru-implements () - "Describe the 'implements' relation for types in the package + "Describe the `implements' relation for types in the package containing the current point." (interactive) (go-guru--start "implements")) @@ -425,19 +425,19 @@ identifier." ;;;###autoload (defun go-guru-whicherrs () "Show globals, constants and types to which the selected -expression (of type 'error') may refer." +expression (of type \"error\") may refer." (interactive) (go-guru--set-scope-if-empty) (go-guru--start "whicherrs")) (defun go-guru-what () - "Run a 'what' query and return the parsed JSON response as an + "Run a `what' query and return the parsed JSON response as an association list." (go-guru--json "what")) (defun go-guru--hl-symbols (posn face id) "Highlight the symbols at the positions POSN by creating -overlays with face FACE. The attribute 'go-guru-overlay on the +overlays with face FACE. The attribute `go-guru-overlay' on the overlays will be set to ID." (save-excursion (mapc (lambda (pos) diff --git a/go-mode.el b/go-mode.el index 6003f715..c054fe9b 100644 --- a/go-mode.el +++ b/go-mode.el @@ -1,4 +1,4 @@ -;;; go-mode.el --- Major mode for the Go programming language +;;; go-mode.el --- Major mode for the Go programming language -*- lexical-binding: t; -*- ;;; Commentary: @@ -147,8 +147,8 @@ constant is changed.") :group 'go) (defcustom go-command "go" - "The 'go' command. -Some users have multiple Go development trees and invoke the 'go' + "The `go' command. +Some users have multiple Go development trees and invoke the `go' tool via a wrapper that sets GOROOT and GOPATH based on the current directory. Such users should customize this variable to point to the wrapper script." @@ -156,8 +156,8 @@ point to the wrapper script." :group 'go) (defcustom gofmt-command "gofmt" - "The 'gofmt' command. -Some users may replace this with 'goimports' + "The `gofmt' command. +Some users may replace this with `goimports' from https://golang.org/x/tools/cmd/goimports." :type 'string :group 'go) @@ -181,7 +181,7 @@ a `before-save-hook'." :group 'go) (defcustom godef-command "godef" - "The 'godef' command." + "The `godef' command." :type 'string :group 'go) @@ -197,7 +197,7 @@ a `before-save-hook'." This is used in e.g. tab completion in `go-import-add'. This package provides two functions: `go-packages-go-list' uses -'go list all' to determine all Go packages. `go-packages-native' uses +`go list all' to determine all Go packages. `go-packages-native' uses elisp to find all .a files in all /pkg/ directories. `go-packages-native' is obsolete as it doesn't behave correctly with the Go build cache or Go modules." @@ -289,7 +289,7 @@ Consider using ‘godoc-gogetdoc’ instead for more accurate results." (defun godoc-gogetdoc (point) "Use the gogetdoc tool to find the documentation for an identifier at POINT. -You can install gogetdoc with 'go get -u github.com/zmb3/gogetdoc'." +You can install gogetdoc with `go get -u github.com/zmb3/gogetdoc'." (if (not (buffer-file-name (go--coverage-origin-buffer))) ;; TODO: gogetdoc supports unsaved files, but not introducing ;; new artificial files, so this limitation will stay for now. @@ -735,7 +735,7 @@ case keyword. It returns nil for the case line itself." (go--in-paren-with-prefix-p ?{ ".(type)")) (defun go--open-paren-position () - "Return non-nil if point is between '(' and ')'. + "Return non-nil if point is between `(' and `)'. The return value is the position of the opening paren." (save-excursion @@ -1655,7 +1655,7 @@ We are looking for the right-hand-side of the type alias" (defun go--parameter-list-type (end) "Return `present' if the parameter list has names, or `absent' if not. Assumes point is at the beginning of a parameter list, just -after '('." +after `('." (save-excursion (skip-chars-forward "[:space:]\n" end) (cond ((> (point) end) @@ -2132,20 +2132,19 @@ code to the Playground. You can disable the confirmation by setting (url-request-data (encode-coding-string (buffer-substring-no-properties start end) - 'utf-8)) - - (content-buf (url-retrieve - "https://play.golang.org/share" - (lambda (arg) - (cond - ((equal :error (car arg)) - (signal 'go-play-error (cdr arg))) - (t - (re-search-forward "\n\n") - (let ((url (format "https://play.golang.org/p/%s" - (buffer-substring (point) (point-max))))) - (when go-play-browse-function - (funcall go-play-browse-function url)))))))))))) + 'utf-8))) + (url-retrieve + "https://play.golang.org/share" + (lambda (arg) + (cond + ((equal :error (car arg)) + (signal 'go-play-error (cdr arg))) + (t + (re-search-forward "\n\n") + (let ((url (format "https://play.golang.org/p/%s" + (buffer-substring (point) (point-max))))) + (when go-play-browse-function + (funcall go-play-browse-function url)))))))))) ;;;###autoload (defun go-download-play (url) @@ -2472,7 +2471,7 @@ divisor for FILE-NAME." (rest (split-string (nth 1 parts) "[., ]"))) (cl-destructuring-bind - (start-line start-column end-line end-column num count) + (start-line start-column end-line end-column _num count) (mapcar #'string-to-number rest) (when (string= (file-name-nondirectory file) file-name) @@ -2619,8 +2618,8 @@ If ARG is non-nil, anonymous functions are ignored." (defun go-goto-function-name (&optional arg) "Go to the name of the current function. -If the function is a test, place point after 'Test'. -If the function is anonymous, place point on the 'func' keyword. +If the function is a test, place point after `Test'. +If the function is anonymous, place point on the `func' keyword. If ARG is non-nil, anonymous functions are skipped." (interactive "P") diff --git a/go-rename.el b/go-rename.el index 1f67bb08..b906cc49 100644 --- a/go-rename.el +++ b/go-rename.el @@ -1,4 +1,4 @@ -;;; go-rename.el --- Integration of the 'gorename' tool into Emacs. +;;; go-rename.el --- Integration of the 'gorename' tool into Emacs. -*- lexical-binding: t; -*- ;; Copyright 2014 The Go Authors. All rights reserved. ;; Use of this source code is governed by a BSD-style diff --git a/test/go-comment-test.el b/test/go-comment-test.el index 819fda7d..d75ad20a 100644 --- a/test/go-comment-test.el +++ b/test/go-comment-test.el @@ -1,4 +1,4 @@ -;;; go-comment-test.el +;;; go-comment-test.el -*- lexical-binding: t; -*- ;; Copyright 2020 The go-mode Authors. All rights reserved. Use of ;; this source code is governed by a BSD-style license that can be diff --git a/test/go-fill-paragraph-test.el b/test/go-fill-paragraph-test.el index 6a4a8306..b08e9279 100644 --- a/test/go-fill-paragraph-test.el +++ b/test/go-fill-paragraph-test.el @@ -1,4 +1,4 @@ -;;; go-fill-paragraph-test.el +;;; go-fill-paragraph-test.el -*- lexical-binding: t; -*- ;; Copyright 2019 The go-mode Authors. All rights reserved. ;; Use of this source code is governed by a BSD-style diff --git a/test/go-font-lock-test.el b/test/go-font-lock-test.el index 3bca76d7..f25a9a0c 100644 --- a/test/go-font-lock-test.el +++ b/test/go-font-lock-test.el @@ -1,4 +1,4 @@ -;;; go-font-lock-test.el +;;; go-font-lock-test.el -*- lexical-binding: t; -*- ;; Copyright 2019 The go-mode Authors. All rights reserved. Use of ;; this source code is governed by a BSD-style license that can be diff --git a/test/go-indentation-test.el b/test/go-indentation-test.el index 8f5d9bc8..8db587bf 100644 --- a/test/go-indentation-test.el +++ b/test/go-indentation-test.el @@ -1,4 +1,4 @@ -;;; go-indentation-test.el +;;; go-indentation-test.el -*- lexical-binding: t; -*- ;; Copyright 2019 The go-mode Authors. All rights reserved. ;; Use of this source code is governed by a BSD-style