forked from mirrors/org-mode
Strictly match language when loading Elisp code
* lisp/org.el (org-babel-load-file): Strictly check language before loading source code. Reported-by: dmg <dmg@turingmachine.org> <http://lists.gnu.org/r/emacs-orgmode/2021-07/msg00631.html>
This commit is contained in:
parent
a43d7a575d
commit
4198cbd074
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue