>From 39ba2f56b2e865c3c73352184aa9b7e891e09a5c Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Mon, 14 Jun 2010 21:54:08 +0200
Subject: [PATCH] Fix comments export in latex.

* lisp/org-exp.el: comment regexp now matches documentation. No more
protection check when deleting comments before export.
---
 lisp/org-exp.el |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 915e1f5..25ec663 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1637,7 +1637,7 @@ table line.  If it is a link, add it to the line containing the link."
   "Remove comments, or convert to backend-specific format.
 COMMENTSP can be a format string for publishing comments.
 When it is nil, all comments will be removed."
-  (let ((re "^\\(#\\|[ \t]*#\\+\\)\\(.*\n?\\)")
+  (let ((re "^\\(#\\|[ \t]*#\\+ \\)\\(.*\n?\\)")
 	pos)
     (goto-char (point-min))
     (while (or (looking-at re)
@@ -1649,9 +1649,8 @@ When it is nil, all comments will be removed."
 		  (match-beginning 0) (match-end 0) '(org-protected t))
 		 (replace-match (format commentsp (match-string 2)) t t))
 	(goto-char (1+ pos))
-	(org-if-unprotected
-	 (replace-match "")
-	 (goto-char (max (point-min) (1- pos))))))))
+	(replace-match "")
+	(goto-char (max (point-min) (1- pos)))))))
 
 (defun org-export-mark-radio-links ()
   "Find all matches for radio targets and turn them into internal links."
-- 
1.7.1

