diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-16 22:41:08 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-16 22:41:08 +0100 |
commit | 51efd7f1db1ca651a267920bd92fbeec4c12eb75 (patch) | |
tree | 18d0f8a425c5065a49dee6b7fdd7396fcb7a0c54 | |
parent | a1f516f8a5082de84f7929960e004dbb0f0fdfa5 (diff) | |
download | org-mode-51efd7f1db1ca651a267920bd92fbeec4c12eb75.tar.gz |
org-list: Fix "Stack overflow in regexp matcher"
* lisp/org-list.el (org-list-item-body-column): Do not backtrack as
much in regexp.
Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110885>
-rw-r--r-- | lisp/org-list.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el index bb39b6e..78a8aea 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2097,11 +2097,13 @@ 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]+\\|$\\)") + (looking-at "[ \t]*\\(\\S-+\\)\\(.*[ \t]::\\)?\\([ \t]\\|$\\)") (if (match-beginning 2) (let ((start (1+ (match-end 2))) (ind (org-get-indentation))) - (if (> start (+ ind org-list-description-max-indent)) (+ ind 5) start)) + (if (> start (+ ind org-list-description-max-indent)) + (+ ind 5) + start)) (+ (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 |