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

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

bug#63345: 28.2; provided-mode-derived-p doesn't work when passed an ali


From: Stefan Monnier
Subject: bug#63345: 28.2; provided-mode-derived-p doesn't work when passed an alias in MODES
Date: Sun, 07 May 2023 17:45:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Damien Cassou [2023-05-07 16:35:38] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> What was the original scenario where you bumped into this problem?
>
> The jinx package defines 'jinx-camel-modes [1], a list of major modes
> for languages using camel case or pascal case. This variable is passed
> to 'derived-mode-p. Before my PR #64 [2], this variable used to contain
> 'javascript-mode (the alias) instead of 'js-mode (the function). For a
> file using 'js-mode, the equivalent of the code below was executed:
>
>   (derived-mode-p 'js-mode 'javascript-mode)
>     ⇒ nil

I see, thanks.

> I was expecting a non-nil value. My PR replaced 'javascript-mode with
> 'js-mode in 'jinx-camel-modes thus working around the problem.

`js-mode` is the right value to use there, indeed.


        Stefan






reply via email to

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