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

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

[nongnu] elpa/go-mode ca48fc5 009/495: add return values to go-goto-impo


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode ca48fc5 009/495: add return values to go-goto-imports that tell which kind of import has been jumped to
Date: Sat, 7 Aug 2021 09:04:33 -0400 (EDT)

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

    add return values to go-goto-imports that tell which kind of import has 
been jumped to
---
 go-mode.el | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index e132d56..503031e 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -473,13 +473,20 @@ declaration."
     (goto-char (point-min))
     (cond
      ((re-search-forward "^import ([^)]+)" nil t)
-      (backward-char 2))
-     ((re-search-forward "\\(^import \\([^\"]+ \\)?\"[^\"]+\"\n?\\)+" nil t))
+      (backward-char 2)
+      'block
+      )
+     ((re-search-forward "\\(^import \\([^\"]+ \\)?\"[^\"]+\"\n?\\)+" nil t)
+      'single
+      )
      ((re-search-forward "^[[:space:]\n]*package .+?\n" nil t)
-      (message "No imports found, moving point after package declaration"))
+      (message "No imports found, moving point after package declaration")
+      'none
+      )
      (t
       (goto-char old-point)
-      (message "No imports or package declaration found. Is this really a Go 
file?")))))
+      (message "No imports or package declaration found. Is this really a Go 
file?")
+      'fail))))
 
 
 (defun go-play-buffer ()



reply via email to

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