From f008590b4b2dbf551c2ce9ee4c173219161e289b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Mon, 14 Jan 2013 12:10:28 +0000 Subject: [PATCH] ls-compile-toplevel bypasses toplevel progns --- ecmalisp.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 5efc3e1..eea0584 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -1499,13 +1499,17 @@ (defun ls-compile-toplevel (sexp) (cond ((and (consp sexp) (eq (car sexp) 'progn)) - (mapconcat 'ls-compile-toplevel (cdr sexp))) + (let ((subs (mapcar 'ls-compile-toplevel (cdr sexp)))) + (join-trailing + (remove-if (lambda (s) (or (null s) (equal s ""))) + subs) + (concat ";" *newline*)))) (t (setq *toplevel-compilations* nil) (let ((code (ls-compile sexp))) (prog1 - (concat (join (mapcar (lambda (x) (concat x ";" *newline*)) - *toplevel-compilations*)) + (concat (join-trailing *toplevel-compilations* + (concat ";" *newline*)) code) (setq *toplevel-compilations* nil)))))) -- 1.7.10.4