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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 68246 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, casouri <at> gmail.com, João Távora <joaotavora <at> gmail.com>
Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes
Date: Mon, 08 Jan 2024 22:55:27 -0500
> But for this to be useful to determine the language
> of a major mode via reverse lookup,

Define "the language".

The mapping from "language" to major mode can't be always reversible, so
`major-mode-remap-alist` works to map "language" to "major-mode" but not
the other way.

The current bug-report *is* about "finding the language" but the code
that needs that info luckily doesn't need "the language" it just needs
to know "does the current buffer contain language FOO", which is an
easier problem, which I propose to solve with `derived-mode-p`, since
that's what we've been using all these years.


        Stefan





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.