0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 19:07:52 +00:00

Revert "Fix global dynamic variables in org-special-blocks.el."

This reverts commit 9054ba39d0.

The variable `line' is dynamically scoped in org-html and should
not be renamed here.
This commit is contained in:
Bastien Guerry 2012-04-06 10:52:34 +02:00
parent 4e35c21c09
commit 35a5f069d8

View file

@ -80,17 +80,17 @@ seen. This is run after a few special cases are taken care of."
(add-hook 'org-export-latex-after-blockquotes-hook
'org-special-blocks-convert-latex-special-cookies)
(defvar org-special-blocks-line)
(defvar line)
(defun org-special-blocks-convert-html-special-cookies ()
"Converts the special cookies into div blocks."
;; Uses the dynamically-bound variable `org-special-blocks-line'.
(when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line)
;; Uses the dynamically-bound variable `line'.
(when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line)
(message "%s" (match-string 1))
(when (equal (match-string 2 org-special-blocks-line) "START")
(when (equal (match-string 2 line) "START")
(org-close-par-maybe)
(insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">")
(insert "\n<div class=\"" (match-string 1 line) "\">")
(org-open-par))
(when (equal (match-string 2 org-special-blocks-line) "END")
(when (equal (match-string 2 line) "END")
(org-close-par-maybe)
(insert "\n</div>")
(org-open-par))