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 in 5fe486807e and restores the fix
applied earlier in 8d272b0d3b (and then replaced by a cond form in
ece347e32c, which later got factored out again).
This commit is contained in:
Achim Gratz 2013-07-01 22:19:54 +02:00
parent 79ce6174fd
commit 8cf4ceb304
1 changed files with 4 additions and 4 deletions

View File

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