From: Kevin M. Rosenberg Date: Mon, 16 Sep 2002 09:58:57 +0000 (+0000) Subject: r2712: Auto commit for Debian build X-Git-Tag: v2.5.5~168 X-Git-Url: http://git.kpe.io/?p=lml.git;a=commitdiff_plain;h=46ab29f53744bd2e24360e108e1bf82d7ec676d1 r2712: Auto commit for Debian build --- diff --git a/lml.cl b/lml.cl index 6ad713c..ebf813a 100644 --- a/lml.cl +++ b/lml.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Aug 2002 ;;;; -;;;; $Id: lml.cl,v 1.8 2002/09/16 09:45:50 kevin Exp $ +;;;; $Id: lml.cl,v 1.9 2002/09/16 09:58:57 kevin Exp $ ;;;; ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -204,7 +204,8 @@ (set-macro-character #\[ #'(lambda (stream char) (declare (ignore char)) - (let ((curr-string (make-array 1024 :fill-pointer 0 :adjustable t :element-type 'character)) + (let ((forms '()) + (curr-string (make-array 1024 :fill-pointer 0 :adjustable t :element-type 'character)) (got-comma nil)) (do ((ch (read-char stream t nil t) (read-char stream t nil t))) ((eql ch #\])) @@ -212,7 +213,7 @@ (if (eql ch #\() ;; Starting top-level ,( (progn - (lml-print curr-string) + (push `(lml-print ,curr-string) forms) (setf (fill-pointer curr-string) 0) (setq got-comma nil) (vector-push #\( curr-string) @@ -223,9 +224,13 @@ (return nil)) (vector-push-extend ch curr-string)) (vector-push-extend #\) curr-string) - (let ((result (eval (read-from-string curr-string)))) - (when result - (lml-print result))) + (let ((eval-string (read-from-string curr-string)) + (result (gensym))) + (push + `(let ((,res ,eval-string)) + (when ,res + (lml-print ,res))) + forms)) (setf (fill-pointer curr-string) 0)) ;; read comma, then non #\( char (progn @@ -239,7 +244,7 @@ (progn (setq got-comma nil) (vector-push-extend ch curr-string))))) - (lml-print curr-string)) - t)) + (push `(lml-print ,curr-string) forms) + `(progn ,(nreverse forms)))))