GNU bug report logs - #68246
30.0.50; Add non-TS mode as extra parent of TS modes

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Thu, 4 Jan 2024 22:12:01 UTC

Severity: wishlist

Found in version 30.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, Eli Zaretskii <eliz <at> gnu.org>, casouri <at> gmail.com, Stefan Kangas <stefankangas <at> gmail.com>, 68246 <at> debbugs.gnu.org
Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes
Date: Fri, 19 Jan 2024 12:53:22 +0000
On Fri, Jan 19, 2024 at 12:43 PM Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:

> In the longer term, there might be a fair bit of overlap, yes, tho it
> all depends on how your proposal works out in the end.
> My patch is a short term solution with no new API.

Problem is, as you know, there's nothing more permanent than
a short-term solution.

Now, if your patch is expressed carefully in terms of
some concepts we could save our skins, so to speak:

instead of directly:

  (derived-mode-add-parents 'foo-ts-mode '(foo-mode))

Why don't we

  (set-super-special-stefan-parent 'foo-ts-mode 'foo)

?

Then

   (provided-mode-derived-p 'foo-ts-mode '(foo-mode))

should always be true because high-minded conceptual reasons
impeccably explained somewhere :-)

Then, we can later edit the implementation of
set-super-special-stefan-parent to accommodate for 'foo'
being a language, the "preferred" or "main" language of
whatever mode is given as the first argument.

João




This bug report was last modified 1 year and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.