branch: elpa/go-mode
commit 63e67b187e8fbe6153995a754c60f65217e53142
Author: Dominik Honnef <[email protected]>
Commit: Dominik Honnef <[email protected]>
go-goto-docstring: fix insertion of function name
We have to insert the comment marker before we call go--function-name,
otherwise we will get the name of the previous function, as there's no
docstring to walk down on yet.
---
go-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/go-mode.el b/go-mode.el
index bf5505e..da87c00 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1787,7 +1787,8 @@ an error is raised unless ARG is non-nil."
(t
(forward-line -1)
(newline)
- (insert (format "// %s " (go--function-name t))))))
+ (insert "// ")
+ (insert (go--function-name t)))))
(defun go--function-name (&optional arg)
"Return the name of the surrounding function.