Function: org-texinfo--menu-entries

org-texinfo--menu-entries is a byte-compiled function defined in ox-texinfo.el.gz.

Signature

(org-texinfo--menu-entries SCOPE INFO)

Documentation

List direct children in SCOPE needing a menu entry.

SCOPE is a headline or a full parse tree. INFO is a plist holding contextual information.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-texinfo.el.gz
(defun org-texinfo--menu-entries (scope info)
  "List direct children in SCOPE needing a menu entry.
SCOPE is a headline or a full parse tree.  INFO is a plist
holding contextual information."
  (let* ((cache (or (plist-get info :texinfo-entries-cache)
		    (plist-get (plist-put info :texinfo-entries-cache
					  (make-hash-table :test #'eq))
			       :texinfo-entries-cache)))
	 (cached-entries (gethash scope cache 'no-cache)))
    (if (not (eq cached-entries 'no-cache)) cached-entries
      (let* ((sections (org-texinfo--sectioning-structure info))
             (max-depth (length sections)))
        (puthash scope
                 (cl-remove-if
		  (lambda (h)
		    (or (org-not-nil (org-export-get-node-property :COPYING h t))
                        (< max-depth (org-export-get-relative-level h info))))
		  (org-export-collect-headlines info 1 scope))
                 cache)))))