all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Randy Taylor <dev@rjt.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Evgeni Kolev <evgeni.d.kolev@gmail.com>,
	62371@debbugs.gnu.org, Yuan Fu <casouri@gmail.com>,
	Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#62371: [PATCH] Fix go-ts-mode incorrect docstring inserted for methods
Date: Sat, 25 Mar 2023 19:37:17 +0000	[thread overview]
Message-ID: <jKn5RFmhbKMmy7jf5N06TUimfnB6BWm-Ccfl9JFMhbkOjDvnDmNsbzx8BuV0oWncmKybcv9VmKJUwHtWS56u8DFFxbSwxksefdPM1nx64Ig=@rjt.dev> (raw)
In-Reply-To: <83o7ohc9eb.fsf@gnu.org>

On Saturday, March 25th, 2023 at 08:17, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > From: Evgeni Kolev evgeni.d.kolev@gmail.com
> 
> > Date: Wed, 22 Mar 2023 10:05:56 +0200
> > 
> > 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.
> > 
> > The issue is caused by imenu and go-ts-mode--defun-name using the same
> > code to determine the defun name. Instead, they should produce
> > different results - imenu should show the "myStruct" prefix, but the
> > docstring should not.
> > 
> > This commit fixes the incorrect behavior by introducing an optional
> > SKIP-PREFIX parameter to (go-ts-mode--defun-name). Pressing C-c C-d
> > now inserts just the method name:
> > 
> > // act
> > func (m *myStruct) act () {...}
> > 
> > * lisp/progmodes/go-ts-mode.el (go-ts-mode--defun-name): New optional
> > parameter SKIP-PREFIX. (go-ts-mode-docstring):
> > Call (go-ts-mode--defun-name t) instead of (treesit-defun-name).
> 
> 
> Thanks.
> 
> Dmitry, Yuan, Randy: any comments?

I guess my email yesterday didn't make it through or got missed?

It looks good to me, feel free to install.





  reply	other threads:[~2023-03-25 19:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22  8:05 bug#62371: [PATCH] Fix go-ts-mode incorrect docstring inserted for methods Evgeni Kolev
2023-03-24 18:21 ` Yuan Fu
2023-03-25  0:58   ` Randy Taylor
2023-03-25 12:17 ` Eli Zaretskii
2023-03-25 19:37   ` Randy Taylor [this message]
2023-03-26  4:34     ` Eli Zaretskii
2023-03-26 11:44       ` Randy Taylor
2023-03-26 12:05         ` Eli Zaretskii
2023-03-27 10:04           ` Evgeni Kolev
2023-03-26  1:56   ` Dmitry Gutov
2023-03-26  5:22     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jKn5RFmhbKMmy7jf5N06TUimfnB6BWm-Ccfl9JFMhbkOjDvnDmNsbzx8BuV0oWncmKybcv9VmKJUwHtWS56u8DFFxbSwxksefdPM1nx64Ig=@rjt.dev' \
    --to=dev@rjt.dev \
    --cc=62371@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=evgeni.d.kolev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.