Fix checkbox creation in numbered lists

* lisp/org.el (org-insert-heading): Check for checkbox at the
  beginning of the item, not just at the beginning of the line.

Without this fix, M-RET in numbered lists would create a checkboxed
item because it was using match data from a previous match.  Now we
make sure we go back to the beginning of the item, so that the match
really tells us if there was a checkbox there.
This commit is contained in:
Carsten Dominik 2013-04-22 07:43:45 +02:00
parent 774b532679
commit bb202235df
1 changed files with 1 additions and 1 deletions

View File

@ -7509,7 +7509,7 @@ This is important for non-interactive uses of the command."
(and (not (org-in-item-p)) org-insert-heading-respect-content)
(not (org-insert-item
(save-excursion
(beginning-of-line)
(org-beginning-of-item)
(looking-at org-list-full-item-re)
(match-string 3)))))
(let (begn endn)