From 101de666a137905e052479776066fafb59ce9ab8 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 28 Aug 2023 21:46:00 -0500 Subject: Clean up import declaration in render-specials Wrap everything in a begin to pass to eval later on. --- schmaltz.scm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/schmaltz.scm b/schmaltz.scm index f1d5e24..f8885f5 100644 --- a/schmaltz.scm +++ b/schmaltz.scm @@ -1,9 +1,4 @@ ;;; schmaltz --- the command-line program -;; This is not written portably. - -(cond-expand - (chicken (import r7rs utf8)) - (else)) (import (schmaltz) (scheme file) @@ -15,9 +10,9 @@ (chicken (render-specials (cons (cons #\@ (lambda (port) ; wrap the next form in `sxml->html' - ;; wow this is ugly ... how can i make this better? - (eval '(import (html-parser)) (interaction-environment)) - `(sxml->html ,(list 'quasiquote (read port))))) + `(begin + (import (html-parser)) + (sxml->html ,(list 'quasiquote (read port)))))) (render-specials))) (render-unprintables (list (cons "#" (lambda _ '())) -- cgit 1.4.1-21-gabe81