From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64442@debbugs.gnu.org
Subject: bug#64442: 29.0.92; treesit-beginning-of-defun fails in DEFUN functions in C
Date: Tue, 11 Jul 2023 19:10:01 -0700 [thread overview]
Message-ID: <93E5B9EA-D349-4316-B314-D6994329C261@gmail.com> (raw)
In-Reply-To: <835y6wgr77.fsf@gnu.org>
> On Jul 6, 2023, at 11:40 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Thu, 6 Jul 2023 23:15:00 -0700
>> Cc: 64442@debbugs.gnu.org
>>
>>> On Jul 4, 2023, at 4:39 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>>>
>>> Why cannot we look for a top-level expression_statement node which is
>>> a call_expression whose function identifier is "DEFUN" and whose
>>> position is between the place where C-M-a was invoked and the place
>>> where it does find a defun?
>>
>> It’s gonna be ugly, but I can take a jab at it this weekend. I’m thinking of a wrapper function that tries to detect DEFUN before falling back to the ordinary tree-sitter defun movement function.
>
> Thanks. let's see how ugly it is before deciding whether it's worth it.
>
>>> DEFUN's cannot be nested, so we don't need to consider that.
>>
>> Yeah, in general C sources don’t have nested defuns, only C++ ones do.
>
> No, I meant the use of DEFUN macros in Emacs cannot be nested.
Just an update. I didn’t forget about this, but it’s more harder than I thought and I’m still working on it :-(
Yuan
next prev parent reply other threads:[~2023-07-12 2:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 17:13 bug#64442: 29.0.92; treesit-beginning-of-defun fails in DEFUN functions in C Eli Zaretskii
2023-07-04 8:41 ` Yuan Fu
2023-07-04 11:39 ` Eli Zaretskii
2023-07-07 6:15 ` Yuan Fu
2023-07-07 6:40 ` Eli Zaretskii
2023-07-12 2:10 ` Yuan Fu [this message]
2023-07-30 7:10 ` Eli Zaretskii
2023-08-10 9:18 ` Eli Zaretskii
2023-08-10 21:33 ` Yuan Fu
2023-08-12 14:59 ` Eli Zaretskii
2023-08-14 5:20 ` Yuan Fu
2023-08-14 11:59 ` Eli Zaretskii
2023-08-15 7:30 ` Yuan Fu
2023-08-17 8:18 ` Eli Zaretskii
2023-08-19 22:00 ` Yuan Fu
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=93E5B9EA-D349-4316-B314-D6994329C261@gmail.com \
--to=casouri@gmail.com \
--cc=64442@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.