From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: 59628-done@debbugs.gnu.org, mardani29@yahoo.es
Subject: bug#59628: 29.0.50; treesit-beginning/end-of-defun problems in C/C++
Date: Thu, 01 Dec 2022 10:08:43 +0200 [thread overview]
Message-ID: <83cz93im0k.fsf@gnu.org> (raw)
In-Reply-To: <0A2994D9-54DC-48EC-8705-46893A962442@gmail.com> (message from Yuan Fu on Wed, 30 Nov 2022 15:07:45 -0800)
> From: Yuan Fu <casouri@gmail.com>
> Date: Wed, 30 Nov 2022 15:07:45 -0800
> Cc: eliz@gnu.org,
> 59628@debbugs.gnu.org
>
>
> Daniel Martín <mardani29@yahoo.es> writes:
>
> > Yuan Fu <casouri@gmail.com> writes:
> >
> >>
> >> Different languages have different grammars that give different names to
> >> function definitions and class definitions. So it is necessary to have a
> >> regexp variable. Finding such a regexp isn’t too hard, so I don’t think
> >> we need a default value. If we do have a default, it would be often wrong,
> >> given differences between language grammars.
> >
> > I see that each major mode sets the value of that buffer-local variable.
> > c-ts-mode sets it to "\\(?:definition\\|specifier\\)" but, is that
> > correct? In C code, treesit-explore-mode shows function definition
> > nodes as "function_definition", so I think the regexp is matching more
> > nodes than expected, causing C-M-a C-M-e to move to weird places in the
> > buffer.
>
> Right, I’ve fixed the value in 599369bf3a3.
Thanks, this seems to work now as expected. So I'm closing the bug.
prev parent reply other threads:[~2022-12-01 8:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-27 10:12 bug#59628: 29.0.50; treesit-beginning/end-of-defun problems in C/C++ Eli Zaretskii
2022-11-28 10:56 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-28 22:08 ` Yuan Fu
2022-11-29 0:12 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-30 23:07 ` Yuan Fu
2022-12-01 8:08 ` Eli Zaretskii [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83cz93im0k.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=59628-done@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=mardani29@yahoo.es \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).