branch: externals/org
commit 4198cbd074222039a02d9c908ac712ff1ef35146
Author: Nicolas Goaziou <[email protected]>
Commit: Nicolas Goaziou <[email protected]>
Strictly match language when loading Elisp code
* lisp/org.el (org-babel-load-file): Strictly check language before
loading source code.
Reported-by: dmg <[email protected]>
<http://lists.gnu.org/r/emacs-orgmode/2021-07/msg00631.html>
---
lisp/org.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index eca12a5..ce68f46 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -232,7 +232,11 @@ byte-compiled before it is loaded."
tangled-file
(file-attribute-modification-time
(file-attributes (file-truename file))))
- (org-babel-tangle-file file tangled-file "emacs-lisp\\|elisp"))
+ (org-babel-tangle-file file
+ tangled-file
+ (rx string-start
+ (or "emacs-lisp" "elisp")
+ string-end)))
(if compile
(progn
(byte-compile-file tangled-file)