bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59816: [PATCH]: bug#59816: 29.0.60; c++-ts-mode handles one-line com


From: Herman
Subject: bug#59816: [PATCH]: bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly
Date: Tue, 6 Dec 2022 00:16:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]