r5195: *** empty log message ***
[lml.git] / 2 / htmlgen.lisp
index 46abc6d1ba5fc6451f34ac613ab9e925f6a0d576..62a99e9733de03c80236c3b8c6d2d3f010f2b5e4 100644 (file)
@@ -1,6 +1,6 @@
 ;; -*- mode: common-lisp; package: lml2 -*-
 ;;
-;; $Id: htmlgen.lisp,v 1.8 2003/06/24 17:57:17 kevin Exp $
+;; $Id: htmlgen.lisp,v 1.9 2003/06/24 20:20:12 kevin Exp $
 ;;
 ;; copyright (c) 1986-2000 Franz Inc, Berkeley, CA 
 ;; copyright (c) 2003 Kevin Rosenberg
        (declare (ignore ent args argsp))
        (unless body
          (error "must have a body with :insert-file"))
-       `(lml-load-path (car ',body))))
+       `(progn ,@(mapcar #'(lambda (bod)
+                             `(lml-load-path ,bod))
+                         body))))
   
   (named-function html-nbsp-print-function
     (lambda (ent cmd args form subst unknown stream)
       (declare (ignore ent unknown subst stream args))
-      (if* (eq cmd :full)
-          then (lml-load-path (cadr form))
-          else (error ":insert-file must be given an argument")))))
+      (assert (eql 2 (length form)))
+      (if (eq cmd :full)
+         (lml-load-path (cadr form))
+         (error ":insert-file must be given an argument")))))
+
+
+(def-special-html :write-string
+    (named-function html-write-string-function
+      (lambda (ent args argsp body)
+       (declare (ignore ent args argsp))
+       `(progn ,@(mapcar #'(lambda (bod)
+                             `(write-string ,bod *html-stream*))
+                         body))))
+  
+  (named-function html-write-string-print-function
+    (lambda (ent cmd args form subst unknown stream)
+      (declare (ignore args ent unknown subst))
+      (assert (eql 2 (length form)))
+      (if (eq cmd :full)
+         (write-string (cadr form) stream)
+         (error ":write-string must be given an argument")))))
+
+(def-special-html :write-char
+    (named-function html-write-char-function
+      (lambda (ent args argsp body)
+       (declare (ignore ent args argsp))
+       `(progn ,@(mapcar #'(lambda (bod)
+                             `(write-char ,bod *html-stream*))
+                         body))))
+  
+  (named-function html-write-char-print-function
+    (lambda (ent cmd args form subst unknown stream)
+      (declare (ignore args ent unknown subst))
+      (assert (eql 2 (length form)))
+      (if (eq cmd :full)
+         (write-char (cadr form) stream)
+         (error ":write-char must be given an argument")))))