emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 445d10d 032/495: do not use goto-line but forward-


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 445d10d 032/495: do not use goto-line but forward-line instead
Date: Sat, 7 Aug 2021 09:04:38 -0400 (EDT)

branch: elpa/go-mode
commit 445d10d99469342fb4e52b36b61c5507939be325
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    do not use goto-line but forward-line instead
    
    goto-line is for interactive use only
---
 go-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index 8fd0cc4..89a4b16 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -659,7 +659,8 @@ 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-line import)
+          (goto-char (point-min))
+          (forward-line (1- import))
           (beginning-of-line)
           (if arg
               (comment-region (line-beginning-position) (line-end-position))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]