diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-19 13:28:21 +0100 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-19 13:28:21 +0100 |
commit | 87454b301ab77b37aa264c38bae87d4c174a88b0 (patch) | |
tree | adf2e39625e12beb7e561953704c2e8aaa9c30e5 | |
parent | dec60afeae6ab0340db5f5ec651c3b002c404551 (diff) |
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.
-rw-r--r-- | www/build-site.el | 9 | ||||
-rw-r--r-- | 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 |