Function: org-list-get-subtree

org-list-get-subtree is a byte-compiled function defined in org-list.el.gz.

Signature

(org-list-get-subtree ITEM STRUCT)

Documentation

List all items having ITEM as a common ancestor, or nil.

STRUCT is the list structure.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-list.el.gz
(defun org-list-get-subtree (item struct)
  "List all items having ITEM as a common ancestor, or nil.
STRUCT is the list structure."
  (let* ((item-end (org-list-get-item-end item struct))
	 (sub-struct (cdr (member (assq item struct) struct)))
	 items)
    (catch :exit
      (pcase-dolist (`(,pos . ,_) sub-struct)
	(if (< pos item-end)
	    (push pos items)
	  (throw :exit nil))))
    (nreverse items)))