Function: footnote-add-footnote

footnote-add-footnote is an interactive and byte-compiled function defined in footnote.el.gz.

Signature

(footnote-add-footnote)

Documentation

Add a numbered footnote.

The number the footnote receives is dependent upon the relative location of any other previously existing footnotes. If the variable footnote-narrow-to-footnotes-when-editing is set, the buffer is narrowed to the footnote body. The restriction is removed by using footnote-back-to-message.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mail/footnote.el.gz
(defun footnote-add-footnote ()
  "Add a numbered footnote.
The number the footnote receives is dependent upon the relative location
of any other previously existing footnotes.
If the variable `footnote-narrow-to-footnotes-when-editing' is set,
the buffer is narrowed to the footnote body.  The restriction is removed
by using `footnote-back-to-message'."
  (interactive "*")
  (let ((num (footnote--make-hole)))
    (message "Adding footnote %d" num)
    (footnote--insert-footnote num)
    (insert (make-string footnote-body-tag-spacing ? ))
    (save-excursion
      (insert
       (if footnote-spaced-footnotes
	   "\n\n"
	 "\n"))
      (when footnote-narrow-to-footnotes-when-editing
	(footnote--narrow-to-footnotes)))))