summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brand <michael.ch.brand@gmail.com>2012-06-10 18:35:39 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2012-06-12 14:35:05 +0200
commit41f427f4bbe2a753b5bbd422a20fef64adbb8159 (patch)
treeff54635373c04ef531bb39d68607d0077c9409f3
parentf2bfa3a6b2db2caa180c8fe6fcd91941223bed67 (diff)
downloadorg-mode-41f427f4bbe2a753b5bbd422a20fef64adbb8159.tar.gz
Description list: improve regexp consistency
* lisp/org-list.el (org-at-item-description-p, org-list-item-body-column): Make the inline regexp more consistent with `org-list-full-item-re', the inline regexp "Description list items" from `org-set-font-lock-defaults and others'. This resolves some issues with M-q (org-fill-paragraph) on description lists.
-rw-r--r--lisp/org-list.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 648497f..c6dcb79 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -489,7 +489,7 @@ group 4: description tag")
(defun org-at-item-description-p ()
"Is point at a description list item?"
- (org-list-at-regexp-after-bullet-p "\\(\\S-.+\\)[ \t]+::[ \t]+"))
+ (org-list-at-regexp-after-bullet-p "\\(\\S-.+\\)[ \t]+::\\([ \t]+\\|$\\)"))
(defun org-at-item-checkbox-p ()
"Is point at a line starting a plain-list item with a checklet?"
@@ -2035,7 +2035,7 @@ Possible values are: `folded', `children' or `subtree'. See
(let (bpos bcol tpos tcol)
(save-excursion
(goto-char item)
- (looking-at "[ \t]*\\(\\S-+\\)\\(.*[ \t]+::\\)?[ \t]+")
+ (looking-at "[ \t]*\\(\\S-+\\)\\(.*[ \t]+::\\)?\\([ \t]+\\|$\\)")
(setq bpos (match-beginning 1) tpos (match-end 0)
bcol (progn (goto-char bpos) (current-column))
tcol (progn (goto-char tpos) (current-column)))