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: Damien Cassou
Subject: bug#63345: 28.2; provided-mode-derived-p doesn't work when passed an alias in MODES
Date: Sun, 07 May 2023 16:35:38 +0200

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 was expecting a non-nil value. My PR replaced 'javascript-mode with
'js-mode in 'jinx-camel-modes thus working around the problem.

[1] https://github.com/minad/jinx/blob/0.8/jinx.el#L96
[2] https://github.com/minad/jinx/pull/64

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill





reply via email to

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