r5203: Auto commit for Debian build
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 25 Jun 2003 21:24:09 +0000 (21:24 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 25 Jun 2003 21:24:09 +0000 (21:24 +0000)
debian/changelog
debian/rules
doc/readme.html
doc/readme.lml
htmlgen.lisp

index 4aae70c04fd382c6998684e4c6de29d4b468e3da..6e2836bc0b117472f51d93e23432a51bec10c068 100644 (file)
@@ -1,3 +1,9 @@
+cl-lml2 (1.1.2-1) unstable; urgency=low
+
+  * Improve documentation
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Wed, 25 Jun 2003 15:23:32 -0600
+
 cl-lml2 (1.1.1-1) unstable; urgency=low
 
   * New upstream
index 3ff626b0e8e580ee0765a4ec49db26e7232ef73b..10e30a0a6363df46ec0e767cc942362efc21f11a 100755 (executable)
@@ -40,7 +40,6 @@ install: build
        # Add here commands to install the package into debian/lml2.
        dh_installdirs $(clc-systems) $(clc-lml2) $(doc-dir)
        dh_install lml2.asd $(shell echo *.lisp) $(clc-lml2)
-       dh_install $(shell echo doc/*.html) $(doc-dir)
        dh_link $(clc-lml2)/lml2.asd $(clc-systems)/lml2.asd
 
 # Build architecture-independent files here.
@@ -52,7 +51,7 @@ binary-arch: build install
        dh_testdir
        dh_testroot
 #      dh_installdebconf       
-       dh_installdocs
+       dh_installdocs doc/readme.html
        dh_installexamples doc/Makefile doc/make.lisp $(shell echo doc/*.lml)
 #      dh_installmenu
 #      dh_installlogrotate
index 839f2706e6d4b6e4a9e8fa3271cba27d904681b4..3b5b4001d0ae50e883afe35a583846cd407d6fd9 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns><head><title>LML README</title><meta http-equiv content /><meta name content /><meta name content /><meta name content /><meta name content /></head><body><h1>LML Documentation</h1><h2>Overview</h2><p><a href>LML</a> is a Common Lisp package for generating HTML and XHTML documents.LML is authored by <a href>Kevin Rosenberg</a>. The home page for LML is <a href>http://lml.b9.com/</a>.</p><h2>Installation</h2><p>The easiest way to install LML is to use the <a href>Debian</a> GNU/Linux operating system. You can then use the command <tt>apt-get install cl-lml</tt> to automatically download and install the LML package.</p><p>On a non-Debian system, you need to have <a href>ASDF</a> installed to load the system definition file. You will need to change the source 
-       pathname in the system file to match the location where you have installed LML.</p><h2>Usage</h2><p>Currently, there is no documentation on the functions provided by LML. However, the source code is instructive and there are example files included in the LML package.</p><h2>Examples</h2><table border cellpadding><tbody><tr><td colspan style>Iteration</td></tr><tr><td><pre>(html
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>LML2 README</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="Copyright" content="Kevin Rosenberg 2002 &lt;kevin@rosenberg.net&gt;" /><meta name="description" content="Lisp Markup Language Documentation" /><meta name="author" content="Kevin Rosenberg" /><meta name="keywords" content="Common Lisp, HTML, Markup Langauge" /></head><body><h1>LML2 Documentation</h1><h2>Overview</h2><p><a href="http://lml2.b9.com">LML2</a> is a Common Lisp package for generating HTML and XHTML documents. LML2 is based on:</p><ul><li><a href="http://lml.b9.com">LML</a> by <a href="mailto:kevin@rosenberg.net">Kevin Rosenberg</a></li><li>htmlgen by <a href="http://www.franz.com">Franz, Inc.</a></li></ul><p>The home page for LML2 is <a href="http://lml2.b9.com/">http://lml2.b9.com/</a>.</p><h2>Differences between LML and LML2</h2><p>The syntax and HTML generation for LML2 are based on Franz's htmlgen macro. Personally, I like the syntax of LML better than LML2, but there are advantages of Franz's approach:</p><ul><li>Faster compilation and runtime HTML generation</li><li>Behavior of tags is extensible</li></ul><h2>Differences between htmlgen and LML2</h2><ul><li>LML2 is XHTML compatible with close tags so that (html :hr) now produces '&lt;hr /&gt;'</li><li>Lowercase tag names so that (html ((:p class 'a))) now produces '&lt;p class="a"&gt;&lt;/p&gt;</li><li>Addition of new tags such as :insert-file, :nbsp, :jscript</li><li>Removal of the if* macro from the htmlgen.lisp source code</li></ul><h2>Installation</h2><p>The easiest way to install LML is to use the <a href="http://www.debian.org/">Debian</a> GNU/Linux operating system. You can then use the command <tt>apt-get install cl-lml2</tt> to automatically download and install the LML2 package.</p><p>On a non-Debian system, you need to have <a href="http://cclan.sourceforge.net/">ASDF</a> installed to load the system definition file. You will need to change the source 
+       pathname in the system file to match the location where you have installed LML.</p><h2>Usage</h2><p>Currently, there is no documentation on the functions provided by LML2. However, the source code is instructive and there are example files included in the LML2 package.</p><h2>Examples</h2><table border=1 cellpadding=3><tbody><tr><td colspan=2 style="color:#000;background-color:#ccc;font-weight:bold;">Iteration</td></tr><tr><td><pre>(html
    (:i "The square of the first five integers are: )"
    (:b
    (loop as x from 1 to 5 
      doing
-     (lml-format " ~D" (* x x))))</pre></td><td><i>The square of the first five integers are: </i><b> 1 4 9 16 25</b></td></tr></tbody></table><hr /><p>View this page's <a href>LML</a> <a href>source</a>.</p></body></html>
\ No newline at end of file
+     (lml-format " ~D" (* x x))))</pre></td><td><i>The square of the first five integers are: </i><b> 1 4 9 16 25</b></td></tr></tbody></table><hr /><p>View this page's <a href="http://lml2.b9.com/">LML2</a> <a href="readme.lml">source</a>.</p></body></html>
\ No newline at end of file
index 3a19c5329a5592bb6f643521e3366670bbf9fa47..3989b9b393c79916e616c058337c22e8a7c35a2f 100644 (file)
@@ -5,7 +5,7 @@
 (page ("readme")
   (html      
    (:head
-    (:title "LML README")
+    (:title "LML2 README")
     ((:meta :http-equiv "Content-Type" :content "text/html; charset=iso-8859-1"))
     ((:meta :name "Copyright" :content "Kevin Rosenberg 2002 <kevin@rosenberg.net>"))
     ((:meta :name "description" :content "Lisp Markup Language Documentation"))
     ((:meta :name "keywords" :content "Common Lisp, HTML, Markup Langauge")))
 
    (:body
-    (:h1 "LML Documentation")
+    (:h1 "LML2 Documentation")
     (:h2 "Overview")
     (:p
-     ((:a :href "http://lml.b9.com") "LML")
-     " is a Common Lisp package for generating HTML and XHTML documents." 
-     "LML is authored by "
-     ((:a :href "mailto:kevin@rosenberg.net") "Kevin Rosenberg")
-     ". The home page for LML is "
-     ((:a :href "http://lml.b9.com/") "http://lml.b9.com/")
-     ".")
+     ((:a :href "http://lml2.b9.com") "LML2")
+     " is a Common Lisp package for generating HTML and XHTML documents."
+     " LML2 is based on:")
     
-    (:h2 "Installation")
-    (:p
-     "The easiest way to install LML is to use the "
-     ((:a :href "http://www.debian.org/") "Debian")
-     " GNU/Linux operating system. You can then use the command "
-     (:tt "apt-get install cl-lml")
-     " to automatically download and install the LML package.")
-    (:p
-     "On a non-Debian system, you need to have "
-     ((:a :href "http://cclan.sourceforge.net/") "ASDF")
-     " installed to load the system definition file. You will need to change the source 
+     (:ul
+      (:li ((:a :href "http://lml.b9.com") "LML") " by "
+          ((:a :href "mailto:kevin@rosenberg.net") "Kevin Rosenberg"))
+      (:li "htmlgen by "
+          ((:a :href "http://www.franz.com") "Franz, Inc.")))
+
+     (:p
+      "The home page for LML2 is "
+      ((:a :href "http://lml2.b9.com/") "http://lml2.b9.com/")
+      ".")
+
+     (:h2 "Differences between LML and LML2")
+     (:p "The syntax and HTML generation for LML2 are based on Franz's htmlgen macro. Personally, I like the syntax of LML better than LML2, but there are advantages of Franz's approach:")
+     (:ul
+      (:li "Faster compilation and runtime HTML generation")
+      (:li "Behavior of tags is extensible"))
+     
+     (:h2 "Differences between htmlgen and LML2")
+     (:ul
+      (:li "LML2 is XHTML compatible with close tags so that (html :hr) now produces '&lt;hr /&gt;'")
+      (:li "Lowercase tag names so that (html ((:p class 'a))) now produces '&lt;p class=\"a\"&gt;&lt;/p&gt;")
+      (:li "Addition of new tags such as :insert-file, :nbsp, :jscript")
+      (:li "Removal of the if* macro from the htmlgen.lisp source code"))
+           
+     (:h2 "Installation")
+     (:p
+      "The easiest way to install LML is to use the "
+      ((:a :href "http://www.debian.org/") "Debian")
+      " GNU/Linux operating system. You can then use the command "
+      (:tt "apt-get install cl-lml2")
+      " to automatically download and install the LML2 package.")
+     (:p
+      "On a non-Debian system, you need to have "
+      ((:a :href "http://cclan.sourceforge.net/") "ASDF")
+      " installed to load the system definition file. You will need to change the source 
        pathname in the system file to match the location where you have installed LML.")
 
     (:h2 "Usage")
     (:p
-     "Currently, there is no documentation on the functions provided by LML. However, the source code is instructive and there are example files included in the LML package.")
+     "Currently, there is no documentation on the functions provided by LML2. However, the source code is instructive and there are example files included in the LML2 package.")
     
     (:h2 "Examples")
     ((:table :border 1 :cellpadding 3)
@@ -66,7 +86,7 @@
     :hr
     (:p
      "View this page's "
-     ((:a :href "http://lml.b9.com/") "LML")
+     ((:a :href "http://lml2.b9.com/") "LML2")
      " "
      ((:a :href "readme.lml") "source")
      ".")
index 62a99e9733de03c80236c3b8c6d2d3f010f2b5e4..f77b6b6a344d94aef7256c16978cba53d7652d3b 100644 (file)
@@ -1,6 +1,6 @@
 ;; -*- mode: common-lisp; package: lml2 -*-
 ;;
-;; $Id: htmlgen.lisp,v 1.9 2003/06/24 20:20:12 kevin Exp $
+;; $Id: htmlgen.lisp,v 1.10 2003/06/25 21:24:09 kevin Exp $
 ;;
 ;; copyright (c) 1986-2000 Franz Inc, Berkeley, CA 
 ;; copyright (c) 2003 Kevin Rosenberg
@@ -9,6 +9,7 @@
 ;;    - Support XHTML end tags
 ;;    - lowercase symbol names for attributes
 ;;    - Add custom tags such as :jscript, :insert-file, :nbsp
+;;    - removal of if* macro -- partially complete
 ;;
 ;; This code is free software; you can redistribute it and/or
 ;; modify it under the terms of the version 2.1 of
        (if* (atom form)
           then (if* (keywordp form)
                   then (let ((ent (gethash form *html-process-table*)))
-                         (if* (null ent)
-                            then (error "unknown html keyword ~s"
-                                        form)
-                            else (do-ent ent nil nil nil)))
+                         (if (null ent)
+                             (error "unknown html keyword ~s" form)
+                           (do-ent ent nil nil nil)))
                 elseif (stringp form)
                   then ; turn into a print of it
                        (push `(write-string ,form *html-stream*) res)
                     then ; (:xxx . body) form
                          (let ((ent (gethash first
                                            *html-process-table*)))
-                           (if* (null ent)
-                              then (error "unknown html keyword ~s"
-                                          form)
-                              else (do-ent ent nil t (cdr form))))
+                           (if (null ent)
+                               (error "unknown html keyword ~s" form)
+                             (do-ent ent nil t (cdr form))))
                   elseif (and (consp first) (keywordp (car first)))
                     then ; ((:xxx args ) . body)
                          (let ((ent (gethash (car first)
                                            *html-process-table*)))
-                           (if* (null ent)
-                              then (error "unknown html keyword ~s"
-                                          form)
-                              else (do-ent ent (cdr first) t (cdr form))))
+                           (if (null ent)
+                               (error "unknown html keyword ~s" form)
+                             (do-ent ent (cdr first) t (cdr form))))
                     else (push form res))))))
     `(progn ,@(nreverse res))))
 
 
 (defun html-atom-check (args open close body)
-  (if* (and args (atom args))
-     then (let ((ans (case args
-                      (:set `(write-string  ,open *html-stream*))
-                      (:unset `(write-string  ,close *html-stream*))
-                      (t (error "illegal arg ~s to ~s" args open)))))
-           (if* (and ans body)
-              then (error "can't have a body form with this arg: ~s"
-                          args)
-              else ans))))
+  (when (and args (atom args))
+    (let ((ans (case args
+                (:set `(write-string  ,open *html-stream*))
+                (:unset `(write-string  ,close *html-stream*))
+                (t (error "illegal arg ~s to ~s" args open)))))
+      (if (and ans body)
+         (error "can't have a body form with this arg: ~s" args)
+       ans))))
 
 (defun html-body-form (open close body)
   ;; used when args don't matter
     ;; single arg 
     (return-from html-body-key-form
       (case args
-       (:set (if* has-inv
-                  then `(write-string  ,(format nil "<~a>" string-code)
-                         *html-stream*)
-                  else `(write-string  ,(format nil "<~a />" string-code)
-                         *html-stream*)))
-       (:unset (if* has-inv
-                    then `(write-string  ,(format nil "</~a>" string-code)
-                           *html-stream*)))
+       (:set (if has-inv
+                 `(write-string  ,(format nil "<~a>" string-code)
+                                 *html-stream*)
+               `(write-string  ,(format nil "<~a />" string-code)
+                               *html-stream*)))
+       (:unset (when has-inv
+                 `(write-string  ,(format nil "</~a>" string-code)
+                                 *html-stream*)))
        (t (error "illegal arg ~s to ~s" args string-code)))))
   
   (unless (evenp (length args))
            ,(unless has-inv `(write-string " /" *html-stream*))
            (write-string ">" *html-stream*)
            ,@body
-           ,(if* (and body has-inv)
-                 then `(write-string ,(format nil "</~a>" string-code)
-                        *html-stream*)))
+           ,(when (and body has-inv)
+              `(write-string ,(format nil "</~a>" string-code)
+                             *html-stream*)))
      else
      (if* has-inv
          then
          `(progn (write-string ,(format nil "<~a>" string-code)
                   *html-stream*)
            ,@body
-           ,(if* body
-                 then `(write-string ,(format nil "</~a>" string-code)
-                        *html-stream*)))
+           ,(when body
+              `(write-string ,(format nil "</~a>" string-code)
+                             *html-stream*)))
          else
          `(progn (write-string ,(format nil "<~a />" string-code)
                   *html-stream*)))))
   ;; print the contents inside a string double quotes (which should
   ;; not be turned into &quot;'s
   ;; symbols are turned into their name
-  (if* (and (symbolp val)
-           (equal "" (symbol-name val)))
-     thenret ; do nothing
-     else (write-char #\= *html-stream*)
-         (if* (or (stringp val)
-                  (and (symbolp val) 
-                       (setq val (string-downcase
-                                  (symbol-name val)))))
-            then (write-char #\" *html-stream*)
-                 (emit-safe *html-stream* val)
-                 (write-char #\" *html-stream*)
-            else (prin1-safe-http val))))
-
+  (unless (and (symbolp val)
+              (equal "" (symbol-name val)))
+    (write-char #\= *html-stream*)
+    (if* (or (stringp val)
+            (and (symbolp val) 
+                 (setq val (string-downcase
+                            (symbol-name val)))))
+       then (write-char #\" *html-stream*)
+           (emit-safe *html-stream* val)
+           (write-char #\" *html-stream*)
+       else (prin1-safe-http val))))
 
 
 (defun emit-safe (stream string)
        (start i)
        (end (length string)))
       ((>= i end)
-       (if* (< start i)
-         then  (write-sequence string
-                               stream
-                               :start start
-                               :end i)))
-        
+       (when (< start i)
+        (write-sequence string stream :start start :end i)))
       
     (let ((ch (schar string i))
          (cvt ))
       (if* cvt
         then ; must do a conversion, emit previous chars first
                
-             (if* (< start i)
-                then  (write-sequence string
-                                      stream
-                                      :start start
-                                      :end i))
+             (when (< start i)
+               (write-sequence string stream :start start :end i))
              (write-string cvt stream)
                
              (setq start (1+ i))))))
         ent)
     (if* (keywordp possible-kwd)
        then (if* (null (setq ent (gethash possible-kwd *html-process-table*)))
-              then (if* unknown
-                      then (return-from html-print-subst
-                             (funcall unknown form stream))
-                      else (error "unknown html tag: ~s" possible-kwd))
+              then (if unknown
+                       (return-from html-print-subst
+                         (funcall unknown form stream))
+                     (error "unknown html tag: ~s" possible-kwd))
               else ; see if we should subst
                    (if* (and subst 
                              attrs 
        then (funcall print-handler 
                     ent
                     :full
-                    (if* (consp (car form)) then (cdr (car form)))
+                    (when (consp (car form)) (cdr (car form)))
                     form 
                     subst
                     unknown
          ((null entlist) (setq alist nil))
        (if* (consp (car ent))
           then ; this is another alist
-               (if* (cdr entlist)
-                  then (push (cdr entlist) to-process))
+               (when (cdr entlist)
+                 (push (cdr entlist) to-process))
                (setq alist ent)
                (return) ; exit do*
         elseif (equal key (car ent))
       (if* (null alist)
         then ; we need to find a new alist to process
             
-             (if* to-process
-                then (setq alist (pop to-process))
-                else (return))))))
+             (if to-process
+                 (setq alist (pop to-process))
+               (return))))))
 
 (defun html-standard-print (ent cmd args form subst unknown stream)
   ;; the print handler for the normal html operators
          else (format stream "<~a>" (html-process-key ent)))
        (dolist (ff (cdr form))
         (html-print-subst ff subst stream unknown)))
-     (if* (html-process-has-inverse ent)
-       then ; end the form
-            (format stream "</~a>" (html-process-key ent))))))
+     (when (html-process-has-inverse ent)
+       ;; end the form
+       (format stream "</~a>" (html-process-key ent))))))
      
   
   
     (named-function html-newline-function
       (lambda (ent args argsp body)
        (declare (ignore ent args argsp))
-       (if* body
-          then (error "can't have a body with :newline -- body is ~s" body))
-                              
+       (when body
+         (error "can't have a body with :newline -- body is ~s" body))
        `(terpri *html-stream*)))
   
   (named-function html-newline-print-function
     (lambda (ent cmd args form subst unknown stream)
       (declare (ignore args ent unknown subst))
-      (if* (eq cmd :set)
-        then (terpri stream)
-        else (error ":newline in an illegal place: ~s" form)))))
+      (if (eq cmd :set)
+         (terpri stream)
+       (error ":newline in an illegal place: ~s" form)))))
 
 (def-special-html :princ
     (named-function html-princ-function
     (lambda (ent cmd args form subst unknown stream)
       (declare (ignore args ent unknown subst))
       (assert (eql 2 (length form)))
-      (if* (eq cmd :full)
-        then (format stream "~a" (cadr form))
-        else (error ":princ must be given an argument")))))
+      (if (eq cmd :full)
+         (format stream "~a" (cadr form))
+       (error ":princ must be given an argument")))))
 
 (def-special-html :princ-safe 
     (named-function html-princ-safe-function
     (lambda (ent cmd args form subst unknown stream)
       (declare (ignore args ent unknown subst))
       (assert (eql 2 (length form)))
-      (if* (eq cmd :full)
-        then (emit-safe stream (format nil "~a" (cadr form)))
-        else (error ":princ-safe must be given an argument")))))
+      (if (eq cmd :full)
+         (emit-safe stream (format nil "~a" (cadr form)))
+       (error ":princ-safe must be given an argument")))))
 
 (def-special-html :prin1
     (named-function html-prin1-function
     (lambda (ent cmd args form subst unknown stream)
       (declare (ignore ent args unknown subst))
       (assert (eql 2 (length form)))
-      (if* (eq cmd :full)
-        then (format stream "~s" (cadr form))
-        else (error ":prin1 must be given an argument")))))
+      (if (eq cmd :full)
+         (format stream "~s" (cadr form))
+       (error ":prin1 must be given an argument")))))
 
 (def-special-html :prin1-safe
     (named-function html-prin1-safe-function
     (lambda (ent cmd args form subst unknown stream)
       (declare (ignore args ent subst unknown))
       (assert (eql 2 (length form)))
-      (if* (eq cmd :full)
-        then (emit-safe stream (format nil "~s" (cadr form)))
-        else (error ":prin1-safe must be given an argument")))))
+      (if (eq cmd :full)
+         (emit-safe stream (format nil "~s" (cadr form)))
+       (error ":prin1-safe must be given an argument")))))
 
 (def-special-html :comment
     (named-function html-comment-function
   (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 "&nbsp;" stream)
-        else (error ":nbsp in an illegal place: ~s" form)))))
+      (if (eq cmd :set)
+         (write-string "&nbsp;" stream)
+       (error ":nbsp in an illegal place: ~s" form)))))
 
 (def-special-html :insert-file
     (named-function html-nbsp-function