ob-core: fix regression when org-confirm-babel-evaluate is a functionp
* lisp/ob-core.el (org-babel-check-confirm-evaluate): Return result of evaluating the function pointed to by`org-confirm-babel-evaluate' when it is a functionp and its value as a variable otherwise. This fixes a regression introduced in5fe486807e
and restores the fix applied earlier in8d272b0d3b
(and then replaced by a cond form inece347e32c
, which later got factored out again).
This commit is contained in:
parent
79ce6174fd
commit
8cf4ceb304
|
@ -295,10 +295,10 @@ name of the code block."
|
||||||
(noeval (or ,eval-no ,eval-no-export))
|
(noeval (or ,eval-no ,eval-no-export))
|
||||||
(query (or (equal ,eval "query")
|
(query (or (equal ,eval "query")
|
||||||
(and ,export (equal ,eval "query-export"))
|
(and ,export (equal ,eval "query-export"))
|
||||||
(when (functionp org-confirm-babel-evaluate)
|
(if (functionp org-confirm-babel-evaluate)
|
||||||
(funcall org-confirm-babel-evaluate
|
(funcall org-confirm-babel-evaluate
|
||||||
,lang ,block-body))
|
,lang ,block-body)
|
||||||
org-confirm-babel-evaluate))
|
org-confirm-babel-evaluate)))
|
||||||
(code-block (if ,info (format " %s " ,lang) " "))
|
(code-block (if ,info (format " %s " ,lang) " "))
|
||||||
(block-name (if ,name (format " (%s) " ,name) " ")))
|
(block-name (if ,name (format " (%s) " ,name) " ")))
|
||||||
,@body)))
|
,@body)))
|
||||||
|
|
Loading…
Reference in New Issue