aboutsummaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/package/pie.scm12
-rw-r--r--src/guile/skribilo/package/pie/lout.scm11
2 files changed, 8 insertions, 15 deletions
diff --git a/src/guile/skribilo/package/pie.scm b/src/guile/skribilo/package/pie.scm
index 2834076..3290665 100644
--- a/src/guile/skribilo/package/pie.scm
+++ b/src/guile/skribilo/package/pie.scm
@@ -300,10 +300,14 @@ the string \"hello\". Implement `sliceweight' markups too."
(error "slice: this writer should never be invoked")))
(markup-writer 'sliceweight (find-engine 'base)
- :options '(:percentage?)
- :action (lambda (node engine)
- ;; Nothing to do here.
- (error "sliceweight: this writer should never be invoked")))
+ ;; This writer should work for every engine, provided the `pie' markup has
+ ;; a proper `&total-weight' option.
+ :options '(:percentage?)
+ :action (lambda (node engine)
+ (let ((pct? (markup-option node :percentage?)))
+ (output (number->string
+ (pie-sliceweight-value node pct?))
+ engine))))
;;;
diff --git a/src/guile/skribilo/package/pie/lout.scm b/src/guile/skribilo/package/pie/lout.scm
index 085cfc2..03d17fe 100644
--- a/src/guile/skribilo/package/pie/lout.scm
+++ b/src/guile/skribilo/package/pie/lout.scm
@@ -119,14 +119,3 @@
(output (markup-body node) engine)
(display " }\n")))
-(markup-writer 'sliceweight (find-engine 'base)
- ;; This writer should work for every engine, provided the `pie' markup has
- ;; a proper `&total-weight' option.
- :options '(:percentage?)
- :action (lambda (node engine)
- (let ((pct? (markup-option node :percentage?)))
- (output (number->string
- (pie-sliceweight-value node pct?))
- engine))))
-
-;;; arch-tag: b5221e30-f80e-4b72-a281-83ce19ddb755