commit | author | age
|
76bbd0
|
1 |
;ELC |
C |
2 |
;;; Compiled |
|
3 |
;;; in Emacs version 26.1 |
|
4 |
;;; with all optimizations. |
|
5 |
|
|
6 |
;;; This file uses dynamic docstrings, first added in Emacs 19.29. |
|
7 |
|
|
8 |
;;; This file does not contain utf-8 non-ASCII characters, |
|
9 |
;;; and so can be loaded in Emacs versions earlier than 23. |
|
10 |
|
|
11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
12 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
13 |
|
|
14 |
|
|
15 |
(byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib org-macs org-compat] 2) |
|
16 |
#@215 Regular expression for matching footnotes. |
|
17 |
Match group 1 contains footnote's label. It is nil for anonymous |
|
18 |
footnotes. Match group 2 is non-nil only when footnote is |
|
19 |
inline, i.e., it contains its own definition. |
|
20 |
(defconst org-footnote-re "\\[fn:\\(?:\\(?1:[-_[:word:]]+\\)?\\(:\\)\\|\\(?1:[-_[:word:]]+\\)\\]\\)" (#$ . 502)) |
|
21 |
#@102 Regular expression matching the definition of a footnote. |
|
22 |
Match group 1 contains definition's label. |
|
23 |
(defconst org-footnote-definition-re "^\\[fn:\\([-_[:word:]]+\\)\\]" (#$ . 836)) |
|
24 |
#@50 Names of blocks where footnotes are not allowed. |
|
25 |
(defconst org-footnote-forbidden-blocks '("comment" "example" "export" "src") (#$ . 1024)) |
|
26 |
(byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\306\301\316\317\320\321\322\323&\210\310\324\312\313\325DD\326\306\301\322\327&\210\310\330\312\313\331DD\332\306\301\322\333&\210\310\334\312\313\335DD\336\306\301\322\337&\210\310\340\312\313\341DD\342\306\301\322\327&\207" [custom-declare-group org-footnote nil "Footnotes in Org mode." :tag "Org Footnote" :group org custom-declare-variable org-footnote-section funcall function #[0 "\300\207" [#1="Footnotes"] 1 #1#] "Outline heading containing footnote definitions.\n\nThis can be nil, to place footnotes locally at the end of the\ncurrent outline node. If can also be the name of a special\noutline heading under which footnotes should be put.\n\nThis variable defines the place where Org puts the definition\nautomatically, i.e. when creating the footnote, and when sorting\nthe notes. However, by hand you may place definitions\n*anywhere*.\n\nIf this is a string, during export, all subtrees starting with\nthis heading will be ignored.\n\nIf you don't use the customize interface to change this variable,\nyou will need to run the following command after the change:\n\n `\\[universal-argument] \\[org-element-cache-reset]'" :initialize custom-initialize-default :set #[514 "L\210\300\301!\205
\301\302!\207" [fboundp org-element-cache-reset all] 4 "\n\n(fn VAR VAL)"] :type (choice (string :tag "Collect footnotes under heading") (const :tag "Define footnotes locally" nil)) org-footnote-define-inline #[0 "\300\207" [nil] 1] "Non-nil means define footnotes inline, at reference location.\nWhen nil, footnotes will be defined in a special section near\nthe end of the document. When t, the [fn:label:definition] notation\nwill be used to define the footnote at the reference position." boolean org-footnote-auto-label #[0 "\300\207" [t] 1] "Non-nil means define automatically new labels for footnotes.\nPossible values are:\n\nnil Prompt the user for each label.\nt Create unique labels of the form [fn:1], [fn:2], etc.\nconfirm Like t, but let the user edit the created value.\n The label can be removed from the minibuffer to create\n an anonymous footnote.\nrandom Automatically generate a unique, random label." (choice (const :tag "Prompt for label" nil) (const :tag "Create automatic [fn:N]" t) (const :tag "Offer automatic [fn:N] for editing" confirm) (const :tag "Create a random label" random)) org-footnote-auto-adjust #[0 "\300\207" [nil] 1] "Non-nil means automatically adjust footnotes after insert/delete.\nWhen this is t, after each insertion or deletion of a footnote,\nsimple fn:N footnotes will be renumbered, and all footnotes will be sorted.\nIf you want to have just sorting or just renumbering, set this variable\nto `sort' or `renumber'.\n\nThe main values of this variable can be set with in-buffer options:\n\n#+STARTUP: fnadjust\n#+STARTUP: nofnadjust" (choice (const :tag "No adjustment" nil) (const :tag "Renumber" renumber) (const :tag "Sort" sort) (const :tag "Renumber and Sort" t)) org-footnote-fill-after-inline-note-extraction #[0 "\300\207" [nil] 1] "Non-nil means fill paragraphs after extracting footnotes.\nWhen extracting inline footnotes, the lengths of lines can change a lot.\nWhen this option is set, paragraphs from which an inline footnote has been\nextracted will be filled again."] 12) |
|
27 |
#@52 Is point in a context where footnotes are allowed? |
|
28 |
(defalias 'org-footnote-in-valid-context-p #[0 "\301 \302\303\304\305\306!\307\"\310$\216\311 \206+ \312 \206+ \313 \206+ \212\314 \210\315\316!)\206+ \317!)?\207" [org-footnote-forbidden-blocks match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 org-at-comment-p org-inside-LaTeX-fragment-p org-in-verbatim-emphasis beginning-of-line looking-at "[ ]*:[ ]+" org-in-block-p] 7 (#$ . 4546)]) |
|
29 |
#@150 Is the cursor at a footnote reference? |
|
30 |
|
|
31 |
If so, return a list containing its label, beginning and ending |
|
32 |
positions, and the definition, when inlined. |
|
33 |
(defalias 'org-footnote-at-reference-p #[0 "\302 \205\202 \303!\204 \304!\204 \212\305\306\307#)\205\202 \310\224\311 U?\205\202 \310\224\312\313!\31415 \315\313\"0\2027 \210\306\211\205\200 `W\205\200 \212b\210\316 \317\310\320\321\322!\323\"\324$\216\304 !)\262\211\205a `AW\262)?\205\200 \325 ?\205\200 \326\225\205 \327\330\310\225S\"!F\266\203\207" [org-footnote-re org-bracket-link-regexp org-footnote-in-valid-context-p looking-at org-in-regexp re-search-backward nil t 0 line-beginning-position match-string-no-properties 1 (error) scan-sexps match-data make-byte-code "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 org-inside-latex-macro-p 2 org-trim buffer-substring-no-properties] 10 (#$ . 5039)]) |
|
34 |
#@379 Is point within a footnote definition? |
|
35 |
|
|
36 |
This matches only pure definitions like [1] or [fn:name] at the |
|
37 |
beginning of a line. It does not match references like |
|
38 |
[fn:name:definition], where the footnote text is included and |
|
39 |
defined locally. |
|
40 |
|
|
41 |
The return value will be nil if not at a footnote definition, and |
|
42 |
a list with label, start, end and definition of the footnote |
|
43 |
otherwise. |
|
44 |
(defalias 'org-footnote-at-definition-p #[0 "\212\302 \210\303 )\205N \212\304\210\212\305\306P\304\307#)\305 \307#\205K \310\311!\312\224\312\225\304\210\313\314 \314\315\260\304\316#\203< |