فهرست منبع

Fix bug in org-babel-execute-src-block

* lisp/ob-core.el (org-babel-execute-src-block): Use `copy-tree'
to prevent setf from modifying users variables withing let-bound
`info' variable.

Otherwise, the setf calls in this function can reach into and change
other configuration variables, such as the library of babel.
Aaron Ecay 12 سال پیش
والد
کامیت
4d763f35f5
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      lisp/ob-core.el

+ 3 - 1
lisp/ob-core.el

@@ -541,7 +541,9 @@ Optionally supply a value for PARAMS which will be merged with
 the header arguments specified at the front of the source code
 block."
   (interactive)
-  (let* ((info (or info (org-babel-get-src-block-info)))
+  (let* ((info (if info
+		   (copy-tree info)
+		 (org-babel-get-src-block-info)))
 	 (merged-params (org-babel-merge-params (nth 2 info) params)))
     (when (org-babel-check-evaluate
 	   (let ((i info)) (setf (nth 2 i) merged-params) i))