Browse Source

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.
Carsten Dominik 12 years ago
parent
commit
bb202235df
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -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)