From 47fcfd522294560dbe01f00b640631964e063cf0 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sun, 27 Jun 2010 19:35:34 -0700 Subject: [PATCH 1/2] org-exp: check for protection before removing comments * lisp/org-exp.el (org-export-handle-comments): check for protection before removing comments --- lisp/org-exp.el | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 704c0b7..411557a 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1650,8 +1650,10 @@ 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)) - (replace-match "") - (goto-char (max (point-min) (1- pos))))))) + (org-if-unprotected + (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.0.4