unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Theodor Thornhill <theo@thornhill.no>
Cc: 59816@debbugs.gnu.org, geza.herman@gmail.com
Subject: bug#59816: [PATCH]: bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly
Date: Mon, 05 Dec 2022 15:01:16 +0200	[thread overview]
Message-ID: <83sfhu80o3.fsf@gnu.org> (raw)
In-Reply-To: <878rjmdnpa.fsf@thornhill.no> (message from Theodor Thornhill on Mon, 05 Dec 2022 13:44:49 +0100)

> 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.

> 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.





  reply	other threads:[~2022-12-05 13:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04 12:58 bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly Herman, Géza
2022-12-05 12:44 ` bug#59816: [PATCH]: " Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-05 13:01   ` Eli Zaretskii [this message]
2022-12-05 13:21     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-05 23:16       ` Herman, Géza
2022-12-06  7:00         ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-05 16:44 ` Alan Mackenzie
2022-12-05 17:07   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-07 19:36 ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sfhu80o3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59816@debbugs.gnu.org \
    --cc=geza.herman@gmail.com \
    --cc=theo@thornhill.no \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).