From 87454b301ab77b37aa264c38bae87d4c174a88b0 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Fri, 19 Jan 2024 13:28:21 +0100 Subject: Create proper object for the builder It turned out I had not constructed a real closure before. I also decided to explicitly return nil for future code expansions. --- www/build-site.el | 9 ++++++--- www/www.org | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/www/build-site.el b/www/build-site.el index cac2525..575bfe2 100644 --- a/www/build-site.el +++ b/www/build-site.el @@ -2,9 +2,12 @@ ( require 'ox-publish ) -( setq build-publication +( defun publication-builder () ( let ( ( report-success "Build complete!" ) ) ( lambda () - ( message report-success ) ) ) ) + ( message report-success ) + ( ) ) ) ) -( funcall build-publication ) +( defvar publish ( publication-builder ) ) + +( funcall publish ) diff --git a/www/www.org b/www/www.org index 669d297..1b0a362 100644 --- a/www/www.org +++ b/www/www.org @@ -47,12 +47,15 @@ are also published, in the sequence given. ( require 'ox-publish ) - ( setq build-publication + ( defun publication-builder () ( let ( ( report-success "Build complete!" ) ) ( lambda () - ( message report-success ) ) ) ) + ( message report-success ) + ( ) ) ) ) - ( funcall build-publication ) + ( defvar publish ( publication-builder ) ) + + ( funcall publish ) #+END_SRC * EOF -- cgit v1.2.3