r11859: Canonicalize whitespace
[lml2.git] / base.lisp
index 7054761ea88fbf77243537dc57faacfb4d0faa46..208e1a7a9b78655815bed49f7cfd6ac03d2e4af1 100644 (file)
--- a/base.lisp
+++ b/base.lisp
@@ -20,8 +20,8 @@
 (defun lml-format (str &rest args)
   (when (streamp *html-stream*)
     (if args
 (defun lml-format (str &rest args)
   (when (streamp *html-stream*)
     (if args
-       (apply #'format *html-stream* str args)
-       (write-string str *html-stream*))))
+        (apply #'format *html-stream* str args)
+        (write-string str *html-stream*))))
 
 (defun lml-princ (s)
   (princ s *html-stream*))
 
 (defun lml-princ (s)
   (princ s *html-stream*))
   (lml-write-string (date-string date)))
 
 (defun xml-header-stream (stream &key (version "1.0") (standalone :unspecified)
   (lml-write-string (date-string date)))
 
 (defun xml-header-stream (stream &key (version "1.0") (standalone :unspecified)
-                  (encoding :unspecified))
+                   (encoding :unspecified))
   (format stream "<?xml version=\"~A\"~A~A ?>"
   (format stream "<?xml version=\"~A\"~A~A ?>"
-         version
-         (if (eq standalone :unspecified)
-             ""
-             (format nil " standalone=\"~A\"" standalone))
-         (if (eq encoding :unspecified)
-             ""
-             (format nil " encoding=\"~A\"" encoding))))
-         
+          version
+          (if (eq standalone :unspecified)
+              ""
+              (format nil " standalone=\"~A\"" standalone))
+          (if (eq encoding :unspecified)
+              ""
+              (format nil " encoding=\"~A\"" encoding))))
+
 (defun dtd-prologue (&optional (format :xhtml11) &key entities)
   (case format
     ((:xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional :xhtml10-frameset :xml)
 (defun dtd-prologue (&optional (format :xhtml11) &key entities)
   (case format
     ((:xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional :xhtml10-frameset :xml)
      (lml-write-char #\newline)
      (case format
        ((:xhtml11 :xhtml)
      (lml-write-char #\newline)
      (case format
        ((:xhtml11 :xhtml)
-       (lml-write-string +xhtml11-dtd-string+))
+        (lml-write-string +xhtml11-dtd-string+))
        (:xhtml10-strict
        (:xhtml10-strict
-       (lml-write-string +xhtml10-strict-dtd-string+))
+        (lml-write-string +xhtml10-strict-dtd-string+))
        (:xhtml10-transitional
        (:xhtml10-transitional
-       (lml-write-string +xhtml10-transitional-dtd-string+))
+        (lml-write-string +xhtml10-transitional-dtd-string+))
        (:xhtml10-frameset
        (:xhtml10-frameset
-       (lml-write-string +xhtml10-frameset-dtd-string+)))
+        (lml-write-string +xhtml10-frameset-dtd-string+)))
      (when entities
        (lml-write-char #\space)
        (lml-write-char #\[)
      (when entities
        (lml-write-char #\space)
        (lml-write-char #\[)
 
 
 (defmacro html-file-page ((out-file &key (format :xhtml11))
 
 
 (defmacro html-file-page ((out-file &key (format :xhtml11))
-                         &body body)
+                          &body body)
   `(with-open-file (*html-stream*
   `(with-open-file (*html-stream*
-                   (lml-file-name ',out-file :output)
-                   :direction :output
-                   :if-exists :supersede)
+                    (lml-file-name ',out-file :output)
+                    :direction :output
+                    :if-exists :supersede)
      (dtd-prologue ,format)
      (html
       ((:html :xmlns "http://www.w3.org/1999/xhtml")
        ,@body))))
      (dtd-prologue ,format)
      (html
       ((:html :xmlns "http://www.w3.org/1999/xhtml")
        ,@body))))
-                    
+
 
 (defmacro alink (url desc)
   `(html
 
 (defmacro alink (url desc)
   `(html