Subject: Re: bug#62825: 29.0.90; c-ts-mode doesn't recognize DEFUN functions

From: Yuan Fu <[email-masked]>
Date: Wed, 19 Apr 2023 12:11:18 -0700

> On Apr 16, 2023, at 1:14 AM, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Yuan Fu <[email-masked]>
>> Date: Sat, 15 Apr 2023 22:37:02 -0700
>> Cc: [email-masked],
>> [email-masked]
>> 
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>>> Thanks.  But I wonder why do we need the c-ts-mode-emacs-devel knob.
>>> Why not recognize DEFUN by default everywhere?  CC Mode does that,
>>> AFAIK, so why shouldn't c-ts-mode do the same?
>> 
>> I just thought the fix is a bit hacky, and does add some overhead, so
>> people who don’t need it might not be happy to know that they can’t turn
>> it off.
> 
> OK, but I made it into a defcustom and turned this on by default.  I
> also renamed a few symbols, please take a look.

Thanks.

> 
> Btw, should the code you added to c-ts-mode--defun-name recognize
> DEFUN nodes only when this variable is non-nil?

I don’t think it’s necessary, we only need to inhibit creating DEFUN nodes when the feature is turned-off, ie, we only need to control the entry points. 

Yuan