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: Reuben Thomas
Subject: bug#46331: provided-mode-derived-p doesn't work on aliases
Date: Sat, 6 Feb 2021 11:22:31 +0000

On Sat, 6 Feb 2021 at 11:04, Lars Ingebrigtsen <larsi@gnus.org> wrote:
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.

Many thanks!

--
https://rrt.sc3d.org

reply via email to

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