Function: org-footnote-create-definition

org-footnote-create-definition is a byte-compiled function defined in org-footnote.el.gz.

Signature

(org-footnote-create-definition LABEL)

Documentation

Start the definition of a footnote with label LABEL.

Return buffer position at the beginning of the definition. This function doesn't move point.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-footnote.el.gz
(defun org-footnote-create-definition (label)
  "Start the definition of a footnote with label LABEL.
Return buffer position at the beginning of the definition.  This
function doesn't move point."
  (let ((label (org-footnote-normalize-label label))
	electric-indent-mode)		; Prevent wrong indentation.
    (org-preserve-local-variables
     (org-with-wide-buffer
      (cond
       ((not org-footnote-section) (org-footnote--goto-local-insertion-point))
       ((save-excursion
	  (goto-char (point-min))
	  (re-search-forward
	   (concat "^\\*+[ \t]+" (regexp-quote org-footnote-section) "[ \t]*$")
	   nil t))
	(goto-char (match-end 0))
        (org-end-of-meta-data t)
	(unless (bolp) (insert "\n")))
       (t (org-footnote--clear-footnote-section)))
      (when (zerop (org-back-over-empty-lines)) (insert "\n"))
      (insert "[fn:" label "] \n")
      (line-beginning-position 0)))))