[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode b4cbae5 193/495: minor cleanups
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode b4cbae5 193/495: minor cleanups |
Date: |
Sat, 7 Aug 2021 09:05:11 -0400 (EDT) |
branch: elpa/go-mode
commit b4cbae57e71d45b877dbd252cff4b7f69c3660f6
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
minor cleanups
---
go-mode.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 556046c..75c9ac7 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -70,6 +70,7 @@
;; macro.
(if nil
(declare-function go--position-bytes "go-mode" (point)))
+
;; XEmacs unfortunately does not offer position-bytes. We can fall
;; back to just using (point), but it will be incorrect as soon as
;; multibyte characters are being used.
@@ -258,8 +259,8 @@ For mode=set, all covered lines will have this weight."
"Syntax table for Go mode.")
(defun go--build-font-lock-keywords ()
- ;; we cannot use 'symbols in regexp-opt because emacs <24 doesn't
- ;; understand that
+ ;; we cannot use 'symbols in regexp-opt because GNU Emacs <24
+ ;; doesn't understand that
(append
`((,(go--regexp-enclose-in-symbol (regexp-opt go-mode-keywords t)) .
font-lock-keyword-face)
(,(go--regexp-enclose-in-symbol (regexp-opt go-builtins t)) .
font-lock-builtin-face)
@@ -459,8 +460,9 @@ current line will be returned."
(goto-char (- (point-max) pos))))))
(defun go-beginning-of-defun (&optional count)
- (unless count (setq count 1))
- (let ((first t) failure)
+ (setq count (or count 1))
+ (let ((first t)
+ failure)
(dotimes (i (abs count))
(while (and (not failure)
(or first (go-in-string-or-comment-p)))
@@ -522,7 +524,7 @@ The following extra functions are defined:
If you want to automatically run `gofmt' before saving a file,
add the following hook to your emacs configuration:
-\(add-hook 'before-save-hook 'gofmt-before-save)
+\(add-hook 'before-save-hook #'gofmt-before-save)
If you want to use `godef-jump' instead of etags (or similar),
consider binding godef-jump to `M-.', which is the default key
@@ -541,7 +543,8 @@ If you're looking for even more integration with Go, namely
on-the-fly syntax checking, auto-completion and snippets, it is
recommended that you look at goflymake
\(https://github.com/dougm/goflymake), gocode
-\(https://github.com/nsf/gocode) and yasnippet-go
+\(https://github.com/nsf/gocode), go-eldoc
+\(github.com/syohex/emacs-go-eldoc) and yasnippet-go
\(https://github.com/dominikh/yasnippet-go)"
;; Font lock
@@ -1117,7 +1120,7 @@ divisor for FILE-NAME."
(start-line start-column end-line end-column num count)
(mapcar #'string-to-number rest)
- (when (and (string= (file-name-nondirectory file) file-name))
+ (when (string= (file-name-nondirectory file) file-name)
(if (> count max-count)
(setq max-count count))
(push (make-go--covered :start-line start-line
- [nongnu] elpa/go-mode 7ef7e56 163/495: correct docstrings of go-coverage-covered and go-coverage-uncovered, (continued)
- [nongnu] elpa/go-mode 7ef7e56 163/495: correct docstrings of go-coverage-covered and go-coverage-uncovered, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 042f08c 169/495: if go-coverage is called in a coverage buffer, update it by using stored variables, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode eea3ccf 170/495: move some coverage code into own functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fdb2132 179/495: no free variables, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9617f0c 176/495: move actual parsing of coverage file into own function, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1949b57 184/495: match unused imports where path and package name differ, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ff30ae1 190/495: use (function) for function symbols, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 50fb3b2 192/495: allow users to customize the gofmt command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 49c885d 188/495: (foo)(bar) is not a function call when there's a letter directly preceding it, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 83c4e32 185/495: fix typo, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b4cbae5 193/495: minor cleanups,
ELPA Syncer <=
- [nongnu] elpa/go-mode 4a96be2 186/495: handle empty "import ()" in go-goto-imports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4055561 191/495: Don't break on emacsen that don't have declare-function macro, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ad5e273 203/495: suggest flycheck as well as flymake and fix URL markup, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 26ca1fd 199/495: do not highlight built-in function if not followed by '(', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 192c9e2 195/495: Use "point" argument instead of return value of point function, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 73ff68c 198/495: handle backslash in raw string in Emacs 23, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1071ac6 209/495: simplify godef--successful-p, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c597843 214/495: import Go's license, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c2bf889 217/495: remove all references to upstream misc/emacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3fb128a 219/495: Highlight type names in function parameter list, ELPA Syncer, 2021/08/07