Only match complete words in org-export-add-options-to-plist

* org-exp.el (org-export-add-options-to-plist): Require match to start
at a word-boundary.

Previously, if an option was the suffix of another option (such as TeX
and LaTeX) the setting for the former would propagator to the latter.
This seems like an unintended consequence of a lax regexp in
org-export-add-options-to-plist.  This patch allows options to share a
suffix with another option by requiring that the match against an
option starts at a word-boundary.
This commit is contained in:
Lawrence Mitchell 2011-01-20 18:23:22 +00:00 committed by Bastien Guerry
parent 2fb8bff528
commit aa6dba8a74
1 changed files with 1 additions and 1 deletions

View File

@ -830,7 +830,7 @@ security risks."
(let ((op org-export-plist-vars))
(while (setq o (pop op))
(if (and (nth 1 o)
(string-match (concat (regexp-quote (nth 1 o))
(string-match (concat "\\<" (regexp-quote (nth 1 o))
":\\([^ \t\n\r;,.]*\\)")
options))
(setq p (plist-put p (car o)