[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59628: 29.0.50; treesit-beginning/end-of-defun problems in C/C++
From: |
Eli Zaretskii |
Subject: |
bug#59628: 29.0.50; treesit-beginning/end-of-defun problems in C/C++ |
Date: |
Thu, 01 Dec 2022 10:08:43 +0200 |
> 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 in Thread] |
Current Thread |
[Next in Thread] |
- bug#59628: 29.0.50; treesit-beginning/end-of-defun problems in C/C++,
Eli Zaretskii <=