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.
This commit is contained in:
parent
c421ef6a71
commit
30064825b3
10
lisp/org.el
10
lisp/org.el
|
@ -21843,15 +21843,19 @@ hierarchy of headlines by UP levels before marking the subtree."
|
||||||
(re-search-backward "[ \t]*#\\+begin_"nil t))
|
(re-search-backward "[ \t]*#\\+begin_"nil t))
|
||||||
(looking-at "[ \t]*[\n:#|]")
|
(looking-at "[ \t]*[\n:#|]")
|
||||||
(looking-at org-footnote-definition-re)
|
(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)
|
(and (not inline-task-p)
|
||||||
(featurep 'org-inlinetask)
|
(featurep 'org-inlinetask)
|
||||||
(org-inlinetask-in-task-p)
|
(org-inlinetask-in-task-p)
|
||||||
(or (org-inlinetask-goto-beginning) t))))
|
(or (org-inlinetask-goto-beginning) t))))
|
||||||
(beginning-of-line 0))
|
(beginning-of-line 0))
|
||||||
(cond
|
(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.
|
;; There was an heading above.
|
||||||
((looking-at "\\*+[ \t]+")
|
((looking-at "\\*+[ \t]+")
|
||||||
(if (not org-adapt-indentation)
|
(if (not org-adapt-indentation)
|
||||||
|
|
Loading…
Reference in New Issue