Browse Source

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.
Lawrence Mitchell 14 years ago
parent
commit
aa6dba8a74
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-exp.el

+ 1 - 1
lisp/org-exp.el

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