diff options
author | Bastien Guerry <bzg@altern.org> | 2013-04-03 16:51:04 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-04-03 18:28:29 +0200 |
commit | 30064825b3bc013aabe96b11f1afc9c60f665f7f (patch) | |
tree | fa10493f6c5cb06f1aed925f017dd36c93a7ad2f | |
parent | c421ef6a714818c0bd93d793d68be888ea261b1a (diff) | |
download | org-mode-30064825b3bc013aabe96b11f1afc9c60f665f7f.tar.gz |
org.el (org-indent-line): Enhance indentation after a list item
* org.el (org-indent-line): A line just below a line with a
list item is now indented depending on the indentation of this
list item.
-rw-r--r-- | lisp/org.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 350aee6..b36589d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -21843,15 +21843,19 @@ hierarchy of headlines by UP levels before marking the subtree." (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)))) (and (not inline-task-p) (featurep 'org-inlinetask) (org-inlinetask-in-task-p) (or (org-inlinetask-goto-beginning) t)))) (beginning-of-line 0)) (cond + ;; There was a list item above. + ((save-excursion + (and (ignore-errors (goto-char (org-in-item-p))) + (goto-char + (org-list-get-top-point (org-list-struct))))) + (looking-at org-list-full-item-re) + (setq column (length (match-string 0)))) ;; There was an heading above. ((looking-at "\\*+[ \t]+") (if (not org-adapt-indentation) |