summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-03-09 17:48:16 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2011-03-09 17:48:16 +0100
commit6ff4c9f42f39d2a85f5bf38e2f621988af9b0435 (patch)
tree4afa6176ffc650d10efcc60fd9375100df3cce83
parent72011fc4073cbf41dde21b1117daf7ace30d6dea (diff)
downloadorg-mode-6ff4c9f42f39d2a85f5bf38e2f621988af9b0435.tar.gz
List indentation has priority over block indentation
* lisp/org.el (org-indent-line-function): text in both a list and a valid block is indented with regards to current item, not to block boundaries.
-rw-r--r--lisp/org.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org.el b/lisp/org.el
index d066081..22fe9ad 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18991,6 +18991,12 @@ If point is in an inline task, mark that task instead."
;; Literal examples
((looking-at "[ \t]*:[ \t]")
(setq column (org-get-indentation))) ; do nothing
+ ;; Lists
+ ((ignore-errors (goto-char (org-in-item-p)))
+ (setq column (if itemp
+ (org-get-indentation)
+ (org-list-item-body-column (point))))
+ (goto-char pos))
;; Drawers
((and (looking-at "[ \t]*:END:")
(save-excursion (re-search-backward org-drawer-regexp nil t)))
@@ -19012,12 +19018,6 @@ If point is in an inline task, mark that task instead."
;; src blocks: let `org-edit-src-exit' handle them
(org-get-indentation)
(org-get-indentation (match-string 0)))))
- ;; Lists
- ((ignore-errors (goto-char (org-in-item-p)))
- (setq column (if itemp
- (org-get-indentation)
- (org-list-item-body-column (point))))
- (goto-char pos))
;; This line has nothing special, look at the previous relevant
;; line to compute indentation
(t