forked from mirrors/org-mode
org-export: Make BIND keywords case insensitive
* contrib/lisp/org-export.el (org-export--install-letbind-maybe): Make BIND keywords case insensitive. * testing/lisp/test-org-export.el: Add test.
This commit is contained in:
parent
3a6a5c458f
commit
7ce732b294
|
@ -1546,7 +1546,7 @@ possible security risks."
|
|||
"Install the values from #+BIND lines as local variables.
|
||||
Variables must be installed before in-buffer options are
|
||||
retrieved."
|
||||
(let (letbind pair)
|
||||
(let ((case-fold-search t) letbind pair)
|
||||
(org-with-wide-buffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^[ \t]*#\\+BIND:" nil t)
|
||||
|
|
|
@ -88,7 +88,13 @@ already filled in `info'."
|
|||
(let ((org-export-allow-BIND 'confirm))
|
||||
(org-set-local 'org-export--allow-BIND-local nil)
|
||||
(org-export--install-letbind-maybe)
|
||||
(boundp 'variable)))))
|
||||
(boundp 'variable))))
|
||||
;; BIND keywords are case-insensitive.
|
||||
(should
|
||||
(org-test-with-temp-text "#+bind: variable value"
|
||||
(let ((org-export-allow-BIND t))
|
||||
(org-export--install-letbind-maybe)
|
||||
(eq variable 'value)))))
|
||||
|
||||
(ert-deftest test-org-export/parse-option-keyword ()
|
||||
"Test reading all standard #+OPTIONS: items."
|
||||
|
|
Loading…
Reference in New Issue