summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-12-19 12:07:07 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-12-19 12:07:07 +0100
commit9ea8e46df08efb3ac118854c238ac51794caf8d5 (patch)
tree8d1ca679c0ae61e2df7b2c7223052b279629446d
parent3469830e3d95c6176fb91017463c5ef4140dd1c0 (diff)
parent1d7f1349c9d753a5afd8fe1decf7e87a247cc55c (diff)
downloadorg-mode-9ea8e46df08efb3ac118854c238ac51794caf8d5.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-list.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 021f1c6..325a248 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -2097,13 +2097,19 @@ Possible values are: `folded', `children' or `subtree'. See
"Return column at which body of ITEM should start."
(save-excursion
(goto-char item)
- (looking-at "[ \t]*\\(\\S-+\\)\\(.*[ \t]::\\)?\\([ \t]\\|$\\)")
- (if (match-beginning 2)
- (let ((start (1+ (match-end 2)))
+ (if (save-excursion
+ (end-of-line)
+ (re-search-backward
+ "[ \t]::\\([ \t]\\|$\\)" (line-beginning-position) t))
+ ;; Descriptive list item. Body starts after item's tag, if
+ ;; possible.
+ (let ((start (1+ (- (match-beginning 1) (line-beginning-position))))
(ind (org-get-indentation)))
(if (> start (+ ind org-list-description-max-indent))
(+ ind 5)
start))
+ ;; Regular item. Body starts after bullet.
+ (looking-at "[ \t]*\\(\\S-+\\)")
(+ (progn (goto-char (match-end 1)) (current-column))
(if (and org-list-two-spaces-after-bullet-regexp
(string-match-p org-list-two-spaces-after-bullet-regexp