Browse Source

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.
Nicolas Goaziou 9 years ago
1 changed files with 2 additions and 5 deletions
  1. 2 5

+ 2 - 5

@@ -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)))))))
-     ((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))