From 8cf4ceb30488b07817c5debbd0fbdb0e081f1fef Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Mon, 1 Jul 2013 22:19:54 +0200 Subject: [PATCH] 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). --- lisp/ob-core.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index c79fc2590..721c37874 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -295,10 +295,10 @@ name of the code block." (noeval (or ,eval-no ,eval-no-export)) (query (or (equal ,eval "query") (and ,export (equal ,eval "query-export")) - (when (functionp org-confirm-babel-evaluate) - (funcall org-confirm-babel-evaluate - ,lang ,block-body)) - org-confirm-babel-evaluate)) + (if (functionp org-confirm-babel-evaluate) + (funcall org-confirm-babel-evaluate + ,lang ,block-body) + org-confirm-babel-evaluate))) (code-block (if ,info (format " %s " ,lang) " ")) (block-name (if ,name (format " (%s) " ,name) " "))) ,@body)))