summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-09-01 14:19:42 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2012-09-01 14:21:09 +0200
commit7ce732b294a6766a1d461970cc12a97ef4cfc192 (patch)
tree04e445ded644badfef089338226d826055ca0978
parent3a6a5c458f6f1328fa2a8b773d3ab059fc7248e9 (diff)
downloadorg-mode-7ce732b294a6766a1d461970cc12a97ef4cfc192.tar.gz
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.
-rw-r--r--contrib/lisp/org-export.el2
-rw-r--r--testing/lisp/test-org-export.el8
2 files changed, 8 insertions, 2 deletions
diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el
index 354fee0..0ead368 100644
--- a/contrib/lisp/org-export.el
+++ b/contrib/lisp/org-export.el
@@ -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)
diff --git a/testing/lisp/test-org-export.el b/testing/lisp/test-org-export.el
index ed72577..59987a0 100644
--- a/testing/lisp/test-org-export.el
+++ b/testing/lisp/test-org-export.el
@@ -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."