X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=2%2Fhtmlgen.lisp;h=e5de7cfd445bd0bb817138698ff82a4df5222bcf;hb=c3fab8d5f1aa8c75aac43b1d689e9e53210bfd9d;hp=d773748cb71c329a258c43db01777881dd32df88;hpb=1c1139ee65003c48c9b0f9ef554be77ebb3847fc;p=lml.git diff --git a/2/htmlgen.lisp b/2/htmlgen.lisp index d773748..e5de7cf 100644 --- a/2/htmlgen.lisp +++ b/2/htmlgen.lisp @@ -1,6 +1,6 @@ ;; -*- mode: common-lisp; package: lml2 -*- ;; -;; $Id: htmlgen.lisp,v 1.2 2003/06/23 20:08:06 kevin Exp $ +;; $Id: htmlgen.lisp,v 1.5 2003/06/24 16:41:44 kevin Exp $ ;; ;; copyright (c) 1986-2000 Franz Inc, Berkeley, CA ;; copyright (c) 2003 Kevin Rosenberg @@ -742,3 +742,33 @@ (declare (ignore ent cmd args subst unknown)) (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 ',body)))) + + (named-function html-nbsp-print-function + (lambda (ent cmd args form subst unknown stream) + (declare (ignore ent unknown subst stream form)) + (if* (eq cmd :full) + then (lml-load-path (cadr form)) + else (error ":insert-file must be given an argument")))))