Browse Source

Do not enforce white spaces just after [@start:num].

Nicolas Goaziou 14 years ago
parent
commit
0dab6a2e1b
2 changed files with 3 additions and 3 deletions
  1. 2 2
      lisp/org-list.el
  2. 1 1
      lisp/org.el

+ 2 - 2
lisp/org-list.el

@@ -520,7 +520,7 @@ A checkbox is blocked if all of the following conditions are fulfilled:
 	    (error (throw 'exit nil)))
 	  (unless (org-entry-get nil "ORDERED") (throw 'exit nil))
 	  (when (org-search-forward-unenclosed
-                 "^[ \t]*[-+*0-9.)]+[ \t]+\\(\\[@start:[0-9]+\\][ \t]+\\)?\\[[- ]\\]" end t)
+                 "^[ \t]*[-+*0-9.)]+[ \t]+\\(\\[@start:[0-9]+\\][ \t]*\\)?\\[[- ]\\]" end t)
 	    (org-current-line)))))))
 
 ;;; Navigate
@@ -1472,7 +1472,7 @@ sublevels as a list of strings."
 	     (nextitem (or (org-get-next-item (point) end) end))
 	     (item (org-trim (buffer-substring (point) (org-end-of-item-or-at-child))))
 	     (nextindent (if (= (point) end) 0 (org-get-indentation)))
-	     (item (if (string-match "^\\(?:\\[@start:[0-9]+\\][ \t]+\\)?\\[\\([xX ]\\)\\]" item)
+	     (item (if (string-match "^\\(?:\\[@start:[0-9]+\\][ \t]*\\)?\\[\\([xX ]\\)\\]" item)
 		       (replace-match (if (equal (match-string 1 item) " ")
 					  "CBOFF"
 					"CBON")

+ 1 - 1
lisp/org.el

@@ -5457,7 +5457,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
                    '(org-do-emphasis-faces (0 nil append))
                  '(org-do-emphasis-faces)))
 	   ;; Checkboxes
-	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\(?:[ \t]+\\[@start:[0-9]+\\]\\)?\\)[ \t]+\\(\\[[- X]\\]\\)"
+	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)][ \t]+\\(?:\\[@start:[0-9]+\\][ \t]*\\)?\\)\\(\\[[- X]\\]\\)"
 	     2 'org-checkbox prepend)
 	   (if org-provide-checkbox-statistics
 	       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"