X-Git-Url: http://git.kpe.io/?p=lml2.git;a=blobdiff_plain;f=htmlgen.lisp;h=3740158331e7eae39a9c17c4e42322dca9a0b6b3;hp=fdb76f1c35b1a5745ca8da79ff638592e75b1566;hb=eefa9b89408f54530da92a38397463791384cc54;hpb=a5621a5bf235313916f437a55d9998418ee26f5a diff --git a/htmlgen.lisp b/htmlgen.lisp index fdb76f1..3740158 100644 --- a/htmlgen.lisp +++ b/htmlgen.lisp @@ -1,6 +1,6 @@ ;; -*- mode: common-lisp; package: lml2 -*- ;; -;; $Id: htmlgen.lisp,v 1.1 2003/06/20 04:12:29 kevin Exp $ +;; $Id: htmlgen.lisp,v 1.4 2003/06/24 16:30:05 kevin Exp $ ;; ;; copyright (c) 1986-2000 Franz Inc, Berkeley, CA ;; copyright (c) 2003 Kevin Rosenberg @@ -727,12 +727,48 @@ (lambda (ent args argsp body) ;; must use syntax (declare (ignore ent args argsp)) - `(progn (write-string "" *html-stream*)))) + `(progn + (write-string "" *html-stream*)))) (named-function html-comment-print-function (lambda (ent cmd args form subst unknown stream) (declare (ignore ent cmd args subst unknown)) - (format stream "" + (format stream "" (cadr form))))) + +(def-special-html :nbsp + (named-function html-nbsp-function + (lambda (ent args argsp body) + (declare (ignore ent args argsp)) + (when body + (error "can't have a body with :nbsp -- body is ~s" body)) + `(write-string " " *html-stream*))) + + (named-function html-nbsp-print-function + (lambda (ent cmd args form subst unknown stream) + (declare (ignore args ent unknown subst)) + (if* (eq cmd :set) + then (write-string " " stream) + else (error ":nbsp in an illegal place: ~s" form))))) + +(def-special-html :insert-file + (named-function html-nbsp-function + (lambda (ent args argsp body) + (declare (ignore ent argsp)) + (unless body + (error "must have a body with :insert-file")) + `(lml-load-path (car ,args) *html-stream*))) + + (named-function html-nbsp-print-function + (lambda (ent cmd args form subst unknown stream) + (declare (ignore args ent unknown subst)) + (if* (eq cmd :full) + then (lml-load-path (car args)) + else (error ":insert-file must be given an argument")))))