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

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

bug#46331: provided-mode-derived-p doesn't work on aliases


From: Lars Ingebrigtsen
Subject: bug#46331: provided-mode-derived-p doesn't work on aliases
Date: Sat, 06 Feb 2021 12:04:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Reuben Thomas <rrt@sc3d.org> writes:

> javascript-mode is an alias for js-mode, and some third-party modes (e.g.
> json-mode) derive from it.
>
> (provided-mode-derived-p 'js-mode 'prog-mode) == t
>
> but
>
> (provided-mode-derived-p 'javascript-mode 'prog-mode) == nil
>
> Hence in json-mode, (derived-mode-p 'prog-mode) evaluates to nil, which seems
> unfortunate.

Yup.  I've now changed the function to also work on MODE parameters that
are function aliases.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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