]> git.eshelyaron.com Git - emacs.git/commit
Fix 'go-ts-mode's incorrect docstring inserted for methods
authorEvgeni Kolev <evgenysw@gmail.com>
Wed, 8 Feb 2023 15:16:02 +0000 (17:16 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 26 Mar 2023 12:02:52 +0000 (15:02 +0300)
commit1671e2db8a8d43da58c2f250c314a70aba199e09
tree64d3de67cd49b68254ccff1a81f68ddd3fb2d1f0
parent28db56d5f04879675aabb3fb2195ef2dd27716ba
Fix 'go-ts-mode's incorrect docstring inserted for methods

The docstring inserted with go-ts-mode's C-c C-d was incorrectly
prefixed with the receiver "(myStruct).":

    // (myStruct).act
    func (m *myStruct) act () {...}

The above docstring is not correct because the receiver "myStruct"
should not be in the docstring.  This commit fixes the incorrect
behavior.
* lisp/progmodes/go-ts-mode.el (go-ts-mode--defun-name): New
optional argument SKIP-PREFIX.
(go-ts-mode-docstring): Call (go-ts-mode--defun-name t)
instead of (treesit-defun-name).  (Bug#62371)
lisp/progmodes/go-ts-mode.el