X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=htmlgen.lisp;h=62c45dda378ed206a6b14a038ba2e075cf7f78b0;hb=da71af518bcc9ed8513bf5c54a220b2d8a02a326;hp=e315b270368f24f7907d58372b851bce5dd39a4f;hpb=f967b95ae5fd411a19f07fff49c0ba451471e4b0;p=lml2.git diff --git a/htmlgen.lisp b/htmlgen.lisp index e315b27..62c45dd 100644 --- a/htmlgen.lisp +++ b/htmlgen.lisp @@ -1,26 +1,24 @@ ;; -*- mode: common-lisp; package: lml2 -*- ;; -;; $Id: htmlgen.lisp,v 1.3 2003/06/24 01:12:17 kevin Exp $ +;; $Id: htmlgen.lisp,v 1.6 2003/06/24 17:48:41 kevin Exp $ ;; ;; copyright (c) 1986-2000 Franz Inc, Berkeley, CA ;; copyright (c) 2003 Kevin Rosenberg ;; ;; Main changes from Allegro version: -;; - Support XHTML -;; - lowercase symbol names +;; - Support XHTML end tags +;; - lowercase symbol names for attributes +;; - Add custom tags such as :jscript, :insert-file, :nbsp ;; ;; This code is free software; you can redistribute it and/or ;; modify it under the terms of the version 2.1 of ;; the GNU Lesser General Public License as published by -;; the Free Software Foundation, as clarified by the AllegroServe -;; prequel found in license-allegroserve.txt. +;; the Free Software Foundation, as clarified by the LLGPL (in-package #:lml2) -;; html generation - (defstruct (html-process (:type list) (:constructor make-html-process (key has-inverse macro special @@ -757,3 +755,18 @@ (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")))))