Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some warnings #434

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions go-guru.el
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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)
Expand Down
53 changes: 26 additions & 27 deletions go-mode.el
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -147,17 +147,17 @@ 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."
:type 'string
: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)
Expand All @@ -181,7 +181,7 @@ a `before-save-hook'."
:group 'go)

(defcustom godef-command "godef"
"The 'godef' command."
"The `godef' command."
:type 'string
:group 'go)

Expand All @@ -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."
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 _ count)
(mapcar #'string-to-number rest)

(when (string= (file-name-nondirectory file) file-name)
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion go-rename.el
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/go-comment-test.el
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/go-fill-paragraph-test.el
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/go-font-lock-test.el
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/go-indentation-test.el
Original file line number Diff line number Diff line change
@@ -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
Expand Down