Function: footnote-mode

footnote-mode is an autoloaded, interactive and byte-compiled function defined in footnote.el.gz.

Signature

(footnote-mode &optional ARG)

Documentation

Toggle Footnote mode.

Footnote mode is a buffer-local minor mode. If enabled, it provides footnote support for message-mode. To get started, play around with the following keys:
C-c ! a footnote-add-footnote
C-c ! b footnote-back-to-message
C-c ! c footnote-cycle-style
C-c ! d footnote-delete-footnote
C-c ! g footnote-goto-footnote
C-c ! r footnote-renumber-footnotes
C-c ! s footnote-set-style

This is a minor mode. If called interactively, toggle the Footnote mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate the variable footnote-mode(var)/footnote-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Probably introduced at or before Emacs version 21.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mail/footnote.el.gz
;;;###autoload
(define-minor-mode footnote-mode
  "Toggle Footnote mode.

Footnote mode is a buffer-local minor mode.  If enabled, it
provides footnote support for `message-mode'.  To get started,
play around with the following keys:
\\{footnote-minor-mode-map}"
  :lighter    footnote-mode-line-string
  :keymap     footnote-minor-mode-map
  (footnote--local-advice footnote-mode adaptive-fill-function
                          footnote--adaptive-fill-function)
  (footnote--local-advice footnote-mode fill-paragraph-function
                          footnote--fill-paragraph)
  (when footnote-mode
    (make-local-variable 'footnote-style)
    (make-local-variable 'footnote-body-tag-spacing)
    (make-local-variable 'footnote-spaced-footnotes)
    (make-local-variable 'footnote-section-tag)
    (make-local-variable 'footnote-section-tag-regexp)
    (make-local-variable 'footnote-start-tag)
    (make-local-variable 'footnote-end-tag)
    (make-local-variable 'adaptive-fill-function)
    (setq-local sentence-end-base
                (rx (regexp sentence-end-base)
                    (? (seq "[" (+ digit) "]"))))

    ;; Filladapt is a GNU ELPA package.
    (when (boundp 'filladapt-token-table)
      ;; add tokens to filladapt to match footnotes
      ;; 1] xxxxxxxxxxx x x x or [1] x x x x x x x
      ;;    xxx x xx xxx xxxx	     x x x xxxxxxxxxx
      (let ((bullet-regexp (concat (regexp-quote footnote-start-tag)
				   "?[0-9a-zA-Z]+"
				   (regexp-quote footnote-end-tag)
				   "[ \t]")))
	(unless (assoc bullet-regexp filladapt-token-table)
	  (setq filladapt-token-table
		(append filladapt-token-table
			(list (list bullet-regexp 'bullet)))))))
    (footnote--regenerate-alist)))