diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-03-18 20:35:26 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-04-09 11:50:59 +0200 |
commit | a1458ba5ec4ce6349cac50cfddb9bd3632e6973d (patch) | |
tree | 2597d2b2321cef9a3a40dee5d076628693cdd2c4 | |
parent | 9fc5577646621fb6bb41e3cc208a8e5919c57919 (diff) | |
download | org-mode-a1458ba5ec4ce6349cac50cfddb9bd3632e6973d.tar.gz |
Don't indent footnote definitions
* lisp/org.el (org-indent-line-function): footnote definition must
stay at column 0 to be recognized as such. Body below can have
normal indentation, so it should ignore its definition when
computing indentation.
-rw-r--r-- | lisp/org.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el index 0b55055..50ca6bc 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19052,6 +19052,8 @@ If point is in an inline task, mark that task instead." ((looking-at "# ") (setq column 0)) ;; Headings ((looking-at "\\*+ ") (setq column 0)) + ;; Footnote definition + ((looking-at org-footnote-definition-re) (setq column 0)) ;; Literal examples ((looking-at "[ \t]*:[ \t]") (setq column (org-get-indentation))) ; do nothing @@ -19090,15 +19092,16 @@ If point is in an inline task, mark that task instead." (not (looking-at org-drawer-regexp)) ;; When point started in an inline task, do not move ;; above task starting line. - (not (and inline-task-p - (looking-at inline-re))) - ;; Skip comments, verbatim, empty lines, tables, - ;; inline tasks, lists, drawers and blocks. + (not (and inline-task-p (looking-at inline-re))) + ;; Skip drawers, blocks, empty lines, verbatim, + ;; comments, tables, footnotes definitions, lists, + ;; inline tasks. (or (and (looking-at "[ \t]*:END:") (re-search-backward org-drawer-regexp nil t)) (and (looking-at "[ \t]*#\\+end_") (re-search-backward "[ \t]*#\\+begin_"nil t)) (looking-at "[ \t]*[\n:#|]") + (looking-at org-footnote-definition-re) (and (ignore-errors (goto-char (org-in-item-p))) (goto-char (org-list-get-top-point (org-list-struct)))) |