Function: org-export-footnote-first-reference-p
org-export-footnote-first-reference-p is a byte-compiled function
defined in ox.el.gz.
Signature
(org-export-footnote-first-reference-p FOOTNOTE-REFERENCE INFO &optional DATA BODY-FIRST)
Documentation
Non-nil when a footnote reference is the first one for its label.
FOOTNOTE-REFERENCE is the footnote reference being considered. INFO is a plist containing current export state.
Search is done throughout the whole parse tree, or DATA when non-nil.
By default, as soon as a new footnote reference is encountered, other references are searched within its definition. However, if BODY-FIRST is non-nil, this step is delayed after the whole tree is checked. This alters results when references are found in footnote definitions.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export-footnote-first-reference-p
(footnote-reference info &optional data body-first)
"Non-nil when a footnote reference is the first one for its label.
FOOTNOTE-REFERENCE is the footnote reference being considered.
INFO is a plist containing current export state.
Search is done throughout the whole parse tree, or DATA when
non-nil.
By default, as soon as a new footnote reference is encountered,
other references are searched within its definition. However, if
BODY-FIRST is non-nil, this step is delayed after the whole tree
is checked. This alters results when references are found in
footnote definitions."
(let ((label (org-element-property :label footnote-reference)))
;; Anonymous footnotes are always a first reference.
(or (not label)
(catch 'exit
(org-export--footnote-reference-map
(lambda (f)
(let ((l (org-element-property :label f)))
(when (and l label (string= label l))
(throw 'exit (eq footnote-reference f)))))
(or data (plist-get info :parse-tree)) info body-first)))))