[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode ff30ae1 190/495: use (function) for function symbo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode ff30ae1 190/495: use (function) for function symbols |
Date: |
Sat, 7 Aug 2021 09:05:11 -0400 (EDT) |
branch: elpa/go-mode
commit ff30ae1bfbb49bb0b225df15a0b02b607f19da02
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
use (function) for function symbols
---
go-mode.el | 47 ++++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 4b4829d..732ba1d 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -50,8 +50,8 @@
(defalias 'go--kill-whole-line
(if (fboundp 'kill-whole-line)
- 'kill-whole-line
- 'kill-entire-line))
+ #'kill-whole-line
+ #'kill-entire-line))
;; Delete the current line without putting it in the kill-ring.
(defun go--delete-whole-line (&optional arg)
@@ -66,11 +66,12 @@
(go--kill-whole-line arg)))
+(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.
(if (fboundp 'position-bytes)
- (defalias 'go--position-bytes 'position-bytes)
+ (defalias 'go--position-bytes #'position-bytes)
(defun go--position-bytes (point) point))
(defun go--old-completion-list-style (list)
@@ -282,15 +283,15 @@ For mode=set, all covered lines will have this weight."
(defvar go-mode-map
(let ((m (make-sparse-keymap)))
- (define-key m "}" 'go-mode-insert-and-indent)
- (define-key m ")" 'go-mode-insert-and-indent)
- (define-key m "," 'go-mode-insert-and-indent)
- (define-key m ":" 'go-mode-insert-and-indent)
- (define-key m "=" 'go-mode-insert-and-indent)
- (define-key m (kbd "C-c C-a") 'go-import-add)
- (define-key m (kbd "C-c C-j") 'godef-jump)
- (define-key m (kbd "C-x 4 C-c C-j") 'godef-jump-other-window)
- (define-key m (kbd "C-c C-d") 'godef-describe)
+ (define-key m "}" #'go-mode-insert-and-indent)
+ (define-key m ")" #'go-mode-insert-and-indent)
+ (define-key m "," #'go-mode-insert-and-indent)
+ (define-key m ":" #'go-mode-insert-and-indent)
+ (define-key m "=" #'go-mode-insert-and-indent)
+ (define-key m (kbd "C-c C-a") #'go-import-add)
+ (define-key m (kbd "C-c C-j") #'godef-jump)
+ (define-key m (kbd "C-x 4 C-c C-j") #'godef-jump-other-window)
+ (define-key m (kbd "C-c C-d") #'godef-describe)
m)
"Keymap used by Go mode to implement electric keys.")
@@ -519,7 +520,7 @@ consider binding godef-jump to `M-.', which is the default
key
for `find-tag':
\(add-hook 'go-mode-hook (lambda ()
- (local-set-key (kbd \"M-.\") 'godef-jump)))
+ (local-set-key (kbd \"M-.\") #'godef-jump)))
Please note that godef is an external dependency. You can install
it with
@@ -539,7 +540,7 @@ recommended that you look at goflymake
'(go--build-font-lock-keywords))
;; Indentation
- (set (make-local-variable 'indent-line-function) 'go-mode-indent-line)
+ (set (make-local-variable 'indent-line-function) #'go-mode-indent-line)
;; Comments
(set (make-local-variable 'comment-start) "// ")
@@ -547,12 +548,12 @@ recommended that you look at goflymake
(set (make-local-variable 'comment-use-syntax) t)
(set (make-local-variable 'comment-start-skip) "\\(//+\\|/\\*+\\)\\s *")
- (set (make-local-variable 'beginning-of-defun-function)
'go-beginning-of-defun)
- (set (make-local-variable 'end-of-defun-function) 'go-end-of-defun)
+ (set (make-local-variable 'beginning-of-defun-function)
#'go-beginning-of-defun)
+ (set (make-local-variable 'end-of-defun-function) #'go-end-of-defun)
(set (make-local-variable 'parse-sexp-lookup-properties) t)
(if (boundp 'syntax-propertize-function)
- (set (make-local-variable 'syntax-propertize-function)
'go-propertize-syntax))
+ (set (make-local-variable 'syntax-propertize-function)
#'go-propertize-syntax))
(set (make-local-variable 'go-dangling-cache) (make-hash-table :test 'eql))
(add-hook 'before-change-functions (lambda (x y) (setq go-dangling-cache
(make-hash-table :test 'eql))) t t)
@@ -906,13 +907,13 @@ If IGNORE-CASE is non-nil, the comparison is
case-insensitive."
(mapcar (lambda (file)
(let ((sub (substring file (length pkgdir) -2)))
(unless (or (go--string-prefix-p "obj/" sub)
(go--string-prefix-p "tool/" sub))
- (mapconcat 'identity (cdr (split-string sub
"/")) "/"))))
+ (mapconcat #'identity (cdr (split-string sub
"/")) "/"))))
(if (file-directory-p dir)
(directory-files dir t "\\.a$"))))
(if (file-directory-p pkgdir)
(go--directory-dirs pkgdir)))))
(go-root-and-paths)))
- 'string<))
+ #'string<))
(defun go-unused-imports-lines ()
;; FIXME Technically, -o /dev/null fails in quite some cases (on
@@ -959,11 +960,11 @@ will be commented, otherwise they will be removed
completely."
visit FILENAME and go to line LINE and column COLUMN."
(if (not (string-match "\\(.+\\):\\([0-9]+\\):\\([0-9]+\\)" specifier))
;; We've only been given a directory name
- (funcall (if other-window 'find-file-other-window 'find-file) specifier)
+ (funcall (if other-window #'find-file-other-window #'find-file)
specifier)
(let ((filename (match-string 1 specifier))
(line (string-to-number (match-string 2 specifier)))
(column (string-to-number (match-string 3 specifier))))
- (with-current-buffer (funcall (if other-window 'find-file-other-window
'find-file) filename)
+ (with-current-buffer (funcall (if other-window #'find-file-other-window
#'find-file) filename)
(go--goto-line line)
(beginning-of-line)
(forward-char (1- column))
@@ -1002,7 +1003,7 @@ description at POINT."
(let ((description (cdr (butlast (godef--call point) 1))))
(if (not description)
(message "No description found for expression at point")
- (message "%s" (mapconcat 'identity description "\n"))))
+ (message "%s" (mapconcat #'identity description "\n"))))
(file-error (message "Could not run godef binary"))))
(defun godef-jump (point &optional other-window)
@@ -1153,7 +1154,7 @@ for."
(go--coverage-make-overlay range (cadr ranges-and-divisor))))
(if (not (eq cur-buffer (current-buffer)))
- (display-buffer (current-buffer) 'display-buffer-reuse-window)))))
+ (display-buffer (current-buffer) #'display-buffer-reuse-window)))))
(provide 'go-mode)
- [nongnu] elpa/go-mode ec73086 157/495: remove unused code, (continued)
- [nongnu] elpa/go-mode ec73086 157/495: remove unused code, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5fd1c63 156/495: document go-goto-opening-parenthesis, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f4d2977 158/495: add go-coverage to display coverage information, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a5d5039 161/495: use go--goto-line where applicable, ELPA Syncer, 2021/08/07
- [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 <=
- [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, 2021/08/07
- [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