aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Huebner <hans.huebner@gmail.com>2012-09-04 19:21:39 -0400
committerHans Huebner <hans.huebner@gmail.com>2012-09-04 19:21:39 -0400
commit8957ebdbeba05f18339cc5fec4a8c1aaea7d15af (patch)
tree401a834d94628dcfbda561c4fdf8617d546333f1
parentacd9b193bd9cff7c9721115406ed361086254738 (diff)
downloadtl-who-8957ebdbeba05f18339cc5fec4a8c1aaea7d15af.tar.gz
tl-who-8957ebdbeba05f18339cc5fec4a8c1aaea7d15af.tar.bz2
tl-who-8957ebdbeba05f18339cc5fec4a8c1aaea7d15af.zip
Fix problems with declaration processing (Stas Boukarev)
-rw-r--r--util.lisp5
-rw-r--r--who.lisp6
2 files changed, 8 insertions, 3 deletions
diff --git a/util.lisp b/util.lisp
index 717aa7c..f2b0993 100644
--- a/util.lisp
+++ b/util.lisp
@@ -235,6 +235,7 @@ character set."
(loop with declarations
for forms on forms
for form = (first forms)
- while (eql (first form) 'cl:declare)
+ while (and (consp form)
+ (eql (first form) 'cl:declare))
do (push form declarations)
- finally (return (values (nreverse declarations) forms)))) \ No newline at end of file
+ finally (return (values (nreverse declarations) forms))))
diff --git a/who.lisp b/who.lisp
index a512f94..93da604 100644
--- a/who.lisp
+++ b/who.lisp
@@ -189,7 +189,11 @@ flattened list of strings. Utility function used by TREE-TO-COMMANDS-AUX."
nconc (process-tag element #'tree-to-template)
;; list - insert as sexp
else if (consp element)
- collect `(let ((*indent* ,*indent*)) ,element)
+ collect `(let ((*indent* ,*indent*))
+ nil ;; If the element is (declare ...) it
+ ;; won't be interpreted as a declaration and an
+ ;; appropriate error could be signaled
+ ,element)
;; something else - insert verbatim
else
collect element))