summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Wahl <marcowahlsoft@gmail.com>2020-03-30 11:10:12 +0200
committerMarco Wahl <marcowahlsoft@gmail.com>2020-03-30 12:21:39 +0200
commit50ae73854b80e31bfe3e213e9c71f187b6d72da2 (patch)
tree829631e265218784b949c01b02288e234d038f27
parent685b2c441008c4fe3b083d9f11b1123af6f37183 (diff)
downloadorg-mode-50ae73854b80e31bfe3e213e9c71f187b6d72da2.tar.gz
ox-publish: Allow plain as lambda preparation/completion-function
* lisp/ox-publish.el (org-publish-projects): Check for function before check for cons to capture lambda's as such. Reported by Arne Babenhauserheide https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00284.html (cherry picked from commit fffba5b7fdc6cc7b5d92cc31a1a2929fea86de96)
-rw-r--r--lisp/ox-publish.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index a476796..674e625 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -659,8 +659,8 @@ If `:auto-sitemap' is set, publish the sitemap too. If
(let ((plist (cdr project)))
(let ((fun (org-publish-property :preparation-function project)))
(cond
- ((consp fun) (dolist (f fun) (funcall f plist)))
- ((functionp fun) (funcall fun plist))))
+ ((functionp fun) (funcall fun plist))
+ ((consp fun) (dolist (f fun) (funcall f plist)))))
;; Each project uses its own cache file.
(org-publish-initialize-cache (car project))
(when (org-publish-property :auto-sitemap project)
@@ -685,8 +685,8 @@ If `:auto-sitemap' is set, publish the sitemap too. If
(org-publish-file theindex project t)))
(let ((fun (org-publish-property :completion-function project)))
(cond
- ((consp fun) (dolist (f fun) (funcall f plist)))
- ((functionp fun) (funcall fun plist)))))
+ ((functionp fun) (funcall fun plist))
+ ((consp fun) (dolist (f fun) (funcall f plist))))))
(org-publish-write-cache-file)))