summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-11-06 14:14:12 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2011-11-06 14:14:36 +0100
commitd6898e589a889ecc603bfc040bf0f219d00564cd (patch)
treededbe219634574a7534338eda58d513b03742037
parent2a58775d9e5532c9648d9ac74bb6d62c0ce429b9 (diff)
downloadorg-mode-d6898e589a889ecc603bfc040bf0f219d00564cd.tar.gz
org-footnote: Remove opportunity to have inline footnotes at beginning of line
* lisp/org-footnote.el (org-footnote-new): Cannot insert an inline footnote at beginning of line anymore. (org-footnote-at-reference-p): Don't recognize inline footnotes at beginning of line. It is technically possible to allow inline footnotes at beginning of line, their syntax being different enough from standard references. Though, after normalizing them, they will become standard footnotes still at beginning of line, which will break them.
-rw-r--r--lisp/org-footnote.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 7de1551..a812551 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -205,9 +205,7 @@ positions, and the definition, when inlined."
(or (looking-at org-footnote-re)
(org-in-regexp org-footnote-re)
(save-excursion (re-search-backward org-footnote-re nil t)))
- ;; Only inline footnotes can start at bol.
- (or (eq (char-before (match-end 0)) 58)
- (/= (match-beginning 0) (point-at-bol))))
+ (/= (match-beginning 0) (point-at-bol)))
(let* ((beg (match-beginning 0))
(label (or (org-match-string-no-properties 2)
(org-match-string-no-properties 3)
@@ -461,8 +459,7 @@ or new, let the user edit the definition of the footnote."
(mapcar 'list lbls) nil nil
(if (eq org-footnote-auto-label 'confirm) propose nil)))))))
(cond
- ((and label (bolp) (not org-footnote-define-inline))
- (error "Cannot create a non-inlined footnote at left margin"))
+ ((bolp) (error "Cannot create a footnote reference at left margin"))
((not label)
(insert "[fn:: ]")
(backward-char 1))