Function: hierarchy-descendant-p
hierarchy-descendant-p is a byte-compiled function defined in
hierarchy.el.gz.
Signature
(hierarchy-descendant-p HIERARCHY ITEM1 ITEM2)
Documentation
In HIERARCHY, return non-nil if and only if ITEM1 is a descendant of ITEM2.
ITEM1 is a descendant of ITEM2 if and only if both are items of HIERARCHY and either:
- ITEM1 is child of ITEM2, or
- ITEM1's parent is a descendant of ITEM2.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/hierarchy.el.gz
(defun hierarchy-descendant-p (hierarchy item1 item2)
"In HIERARCHY, return non-nil if and only if ITEM1 is a descendant of ITEM2.
ITEM1 is a descendant of ITEM2 if and only if both are items of HIERARCHY
and either:
- ITEM1 is child of ITEM2, or
- ITEM1's parent is a descendant of ITEM2."
(and
(hierarchy-has-item hierarchy item1)
(hierarchy-has-item hierarchy item2)
(or
(hierarchy-child-p hierarchy item1 item2)
(hierarchy-descendant-p
hierarchy (hierarchy-parent hierarchy item1) item2))))