summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-08-15 16:37:39 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:53 +0200
commit05aeeae9ed2a845e89c1e62c3bbab8cd6e35fe1f (patch)
treefbdaea09bc8b91d5032fea15e115cffad12fea61
parent7ef456426e75c333fcabebb40359fde3e47bedee (diff)
downloadorg-mode-05aeeae9ed2a845e89c1e62c3bbab8cd6e35fe1f.tar.gz
First line after a list should not be indented according to list
* org.el (org-indent-line-function): Indent first non blank line after a list according to current heading level.
-rw-r--r--lisp/org.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 80b0fbf..1bd4467 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18585,10 +18585,16 @@ which make use of the date at the cursor."
((looking-at "\\([ \t]*\\):END:")
(goto-char (match-end 1))
(setq column (current-column)))
- ;; There was a list that since ended: indent like top point.
+ ;; There was a list that since ended: indent relatively to
+ ;; current heading.
((org-in-item-p)
- (goto-char (org-list-top-point))
- (setq column (org-get-indentation)))
+ (outline-previous-heading)
+ (if (and org-adapt-indentation
+ (looking-at "\\*+[ \t]+"))
+ (progn
+ (goto-char (match-end 0))
+ (setq column (current-column)))
+ (setq column 0)))
;; Else, nothing noticeable found: get indentation and go on.
(t (setq column (org-get-indentation))))))
(goto-char pos)