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

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

[nongnu] elpa/go-mode 63e67b1 290/495: go-goto-docstring: fix insertion


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 63e67b1 290/495: go-goto-docstring: fix insertion of function name
Date: Sat, 7 Aug 2021 09:05:33 -0400 (EDT)

branch: elpa/go-mode
commit 63e67b187e8fbe6153995a754c60f65217e53142
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>

    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.



reply via email to

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