From 5dd6a07733042d6b732e1be5e15bc771ebbfc595 Mon Sep 17 00:00:00 2001
From: Craig Tanis <craig-tanis@utc.edu>
Date: Mon, 10 Jun 2013 12:50:32 -0400
Subject: [PATCH] List: fix creation of new items with incorrect checkbox

* lisp/org.el (org-insert-heading): makes sure that `org-list-full-item-re' matches before passing `(match-string 3)' to `org-insert-item'

When using org-meta-return at the end of a plain text list, checkboxes were
being wrongly inserted in the new item.

TINYCHANGE
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 2e407a5..3ed01d7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7537,8 +7537,8 @@ This is important for non-interactive uses of the command."
 		(save-excursion
 		  (and itemp
 		       (goto-char itemp)
-		       (looking-at org-list-full-item-re)
-		       (match-string 3))))))
+		       (and (looking-at org-list-full-item-re) (match-string 3))
+		       )))))
       (let (begn endn)
 	(when (org-buffer-narrowed-p)
 	  (setq begn (point-min) endn (point-max))
-- 
1.7.12.4 (Apple Git-37)

