summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-06-28 11:19:56 +0200
committerBastien Guerry <bzg@altern.org>2012-06-28 11:19:56 +0200
commit108fd10a2798d13960a927fc84961ddadc779da3 (patch)
tree8bedfef9ff4137f292edc43649353b489ccfe117
parentcf8d979d8c519ab62a02bc7501baa376b122bf3d (diff)
downloadorg-mode-108fd10a2798d13960a927fc84961ddadc779da3.tar.gz
org-special-blocks.el: Prevent errors by first checking `org-line' is not nil.
* org-special-blocks.el (org-special-blocks-convert-html-special-cookies): Prevent errors by first checking `org-line' is not nil. Thanks to Sébastien Vauban for reporting this.
-rw-r--r--lisp/org-special-blocks.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-special-blocks.el b/lisp/org-special-blocks.el
index 89161f3..ddd6120 100644
--- a/lisp/org-special-blocks.el
+++ b/lisp/org-special-blocks.el
@@ -84,7 +84,7 @@ seen. This is run after a few special cases are taken care of."
(defun org-special-blocks-convert-html-special-cookies ()
"Converts the special cookies into div blocks."
;; Uses the dynamically-bound variable `org-line'.
- (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-line)
+ (when (and org-line (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-line))
(message "%s" (match-string 1))
(when (equal (match-string 2 org-line) "START")
(org-close-par-maybe)