0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

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.
This commit is contained in:
Bastien Guerry 2012-06-28 11:19:56 +02:00
parent cf8d979d8c
commit 108fd10a27

View file

@ -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)