Subject: Re: [PATCH]: bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly

From: Herman, Géza <[email-masked]>
Date: Tue, 6 Dec 2022 00:16:53 +0100

Hi Theo, yes, it works correctly with your patch, thanks!

On 12/5/22 14:21, Theodor Thornhill wrote:
> Eli Zaretskii <[email-masked]> writes:
>
>>> From: Theodor Thornhill <[email-masked]>
>>> Cc: [email-masked], [email-masked]
>>> Date: Mon, 05 Dec 2022 13:44:49 +0100
>>>
>>> You're right.  This is my bad.  This patch addresses it.  What do you
>>> think, Eli?
>> I'll defer to people who know more than I do about these modes.
>>
> Sure, added Yuan to CC.
>
>>> BTW - I see that many modes in general don't refer to their
>>> syntax-tables in their define-derived-mode form.  Is that intentional?
>> The ELisp manual says:
>>
>>   -- Macro: define-derived-mode variant parent name docstring
>>            keyword-args... body...
>>       This macro defines VARIANT as a major mode command, using NAME as
>>       the string form of the mode name.  VARIANT and PARENT should be
>>       unquoted symbols.
>>
>>       The new command VARIANT is defined to call the function PARENT,
>>       then override certain aspects of that parent mode:
>>
>>          [...]
>>
>>          • The new mode has its own syntax table, kept in the variable
>>            ‘VARIANT-syntax-table’, unless you override this using the
>>            ‘:syntax-table’ keyword (see below).  ‘define-derived-mode’
>>            makes the parent mode’s syntax-table the parent of
>>            ‘VARIANT-syntax-table’, unless the latter is already set and
>>            already has a parent different from the standard syntax table.
>>
>> So there's no need to mention it because it happens automatically.
> Right, thanks!
>
> Can you test this patch, Herman, and see if it works for you now?
>
> Theo