[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode a5d5039 161/495: use go--goto-line where applicabl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode a5d5039 161/495: use go--goto-line where applicable |
Date: |
Sat, 7 Aug 2021 09:05:04 -0400 (EDT) |
branch: elpa/go-mode
commit a5d503964b4b699450304c46ed082626bd727f37
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
use go--goto-line where applicable
---
go-mode.el | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index e5cdf43..8ee4715 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -571,8 +571,7 @@ buffer."
(insert text)))))
((equal action "d")
(with-current-buffer target-buffer
- (goto-char (point-min))
- (forward-line (- from line-offset 1))
+ (go--goto-line (- from line-offset))
(incf line-offset len)
(go--delete-whole-line len)))
(t
@@ -889,8 +888,7 @@ will be commented, otherwise they will be removed
completely."
(message "Cannot operate on unsaved buffer")
(setq lines (go-unused-imports-lines))
(dolist (import lines)
- (goto-char (point-min))
- (forward-line (1- import))
+ (go--goto-line import)
(beginning-of-line)
(if arg
(comment-region (line-beginning-position) (line-end-position))
@@ -907,8 +905,7 @@ visit FILENAME and go to line LINE and column COLUMN."
(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)
- (goto-char (point-min))
- (forward-line (1- line))
+ (go--goto-line line)
(beginning-of-line)
(forward-char (1- column))
(if (buffer-modified-p)
@@ -983,8 +980,7 @@ coverage information gathered via go test
-coverprofile=INPUT."
(with-temp-buffer
(insert-file-contents input)
- (goto-char (point-min))
- (forward-line) ;; Skip over mode
+ (go--goto-line 2) ;; Skip over mode
(while (not (eobp))
(let* ((parts (split-string (buffer-substring (point-at-bol)
(point-at-eol)) ":"))
(file (car parts))
- [nongnu] elpa/go-mode 5c3a797 129/495: Handle indentation for multi-line function declarations correctly, (continued)
- [nongnu] elpa/go-mode 5c3a797 129/495: Handle indentation for multi-line function declarations correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f5c445c 130/495: improve godef related documentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 97f55b8 131/495: style changes, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b97cfea 133/495: godef-jump: use push-mark., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a18b3f3 134/495: style change, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 55295da 128/495: formatting, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 50412f7 136/495: add gitignore, ELPA Syncer, 2021/08/07
- [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 <=
- [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