]> git.eshelyaron.com Git - emacs.git/commit
(provided-mode-derived-p): Fix alias case
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 28 Oct 2023 00:18:54 +0000 (20:18 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 28 Oct 2023 00:18:54 +0000 (20:18 -0400)
commit81510f2fff5e61c6fca359e01870139f1302e1ed
treec9722240ff1ddbeda5a133d7eb932bd5a4c49352
parent9acd8c8e530dda326ae5bf852c2437fdcde4e8cc
(provided-mode-derived-p): Fix alias case

The new handling of aliases in `provided-mode-derived-p`
introduced in Emacs-28.1 caused a regression where
(provided-mode-derived-p MODE MODE) returns nil if MODE is an alias.
Rework the loop so we consider an alias as a kind of parent.

* lisp/subr.el (provided-mode-derived-p): Step over aliases separately.

* test/lisp/subr-tests.el (subr-tests--derived-mode-1)
(subr-tests--derived-mode-2): Move out of `provided-mode-derived-p`
and give them properly namespaced names.
(provided-mode-derived-p): Add more tests for aliases.
lisp/subr.el
test/lisp/subr-tests.el