Function: derived-mode-p
derived-mode-p is a byte-compiled function defined in subr.el.gz.
Signature
(derived-mode-p &rest MODES)
Documentation
Non-nil if the current major mode is derived from one of MODES.
Uses the derived-mode-parent property of the symbol to trace backwards.
Probably introduced at or before Emacs version 27.1.
Aliases
epa--derived-mode-p (obsolete since 28.1)
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun derived-mode-p (&rest modes)
"Non-nil if the current major mode is derived from one of MODES.
Uses the `derived-mode-parent' property of the symbol to trace backwards."
(apply #'provided-mode-derived-p major-mode modes))