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:
parent
774b532679
commit
bb202235df
|
@ -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)
|
(and (not (org-in-item-p)) org-insert-heading-respect-content)
|
||||||
(not (org-insert-item
|
(not (org-insert-item
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(beginning-of-line)
|
(org-beginning-of-item)
|
||||||
(looking-at org-list-full-item-re)
|
(looking-at org-list-full-item-re)
|
||||||
(match-string 3)))))
|
(match-string 3)))))
|
||||||
(let (begn endn)
|
(let (begn endn)
|
||||||
|
|
Loading…
Reference in New Issue