projects
/
lml2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r5371: *** empty log message ***
[lml2.git]
/
htmlgen.lisp
diff --git
a/htmlgen.lisp
b/htmlgen.lisp
index ade02768dcec83f390dd072151da943b6fa236d7..b920ec0e8baf953b19b96db5fe83c3ccd9831b01 100644
(file)
--- a/
htmlgen.lisp
+++ b/
htmlgen.lisp
@@
-1,6
+1,6
@@
;; -*- mode: common-lisp; package: lml2 -*-
;;
;; -*- mode: common-lisp; package: lml2 -*-
;;
-;; $Id: htmlgen.lisp,v 1.1
7 2003/07/21 16:20:47
kevin Exp $
+;; $Id: htmlgen.lisp,v 1.1
8 2003/07/21 16:36:22
kevin Exp $
;;
;; copyright (c) 1986-2000 Franz Inc, Berkeley, CA
;; copyright (c) 2003 Kevin Rosenberg
;;
;; copyright (c) 1986-2000 Franz Inc, Berkeley, CA
;; copyright (c) 2003 Kevin Rosenberg
@@
-44,15
+44,11
@@
)
(defmacro html (&rest forms &environment env)
)
(defmacro html (&rest forms &environment env)
- ;; just emit html to the current stream
- ;;(process-html-forms forms env)
-
(post-process-html-forms
(post-process-html-forms
- (process-html-forms forms env))
- )
+ (process-html-forms forms env)))
(defun post-process-html-forms (input-forms)
(defun post-process-html-forms (input-forms)
- "KMR: Walk through forms and combin
ing
write-strings"
+ "KMR: Walk through forms and combin
e
write-strings"
(let (res strs last-stream)
(flet ((flush-strings ()
(when strs
(let (res strs last-stream)
(flet ((flush-strings ()
(when strs
@@
-70,7
+66,8
@@
(push form res))
(t
(cond
(push form res))
(t
(cond
- ((eq (car form) 'cl:write-string)
+ ((and (eq (car form) 'cl:write-string)
+ (stringp (cadr form)))
(if strs
(if (eq last-stream (third form))
(setq strs (concatenate 'string strs (second form)))
(if strs
(if (eq last-stream (third form))
(setq strs (concatenate 'string strs (second form)))
@@
-889,9
+886,11
@@
(named-function html-write-string-function
(lambda (ent args argsp body)
(declare (ignore ent args argsp))
(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))))
+ (if (= (length body) 1)
+ `(write-string ,(car body) *html-stream*)
+ `(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)
(named-function html-write-string-print-function
(lambda (ent cmd args form subst unknown stream)