[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly
From: |
Yuan Fu |
Subject: |
bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly |
Date: |
Wed, 7 Dec 2022 11:36:58 -0800 |
Theodor Thornhill <theo@thornhill.no> writes:
> On 6 December 2022 00:16:53 CET, "Herman, Géza" <geza.herman@gmail.com> wrote:
>>Hi Theo, yes, it works correctly with your patch, thanks!
>>
>>On 12/5/22 14:21, Theodor Thornhill wrote:
>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>
>>>>> From: Theodor Thornhill <theo@thornhill.no>
>>>>> Cc: geza.herman@gmail.com, eliz@gnu.org
>>>>> 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
>>
>
> Nice, thanks for testing!
> Yuan, will you apply this patch?
> Theo
Applied the patch, Thanks!
Yuan
bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly, Alan Mackenzie, 2022/12/05
bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly,
Yuan Fu <=