From: Kevin M. Rosenberg Date: Sun, 12 Jan 2003 05:39:03 +0000 (+0000) Subject: r3744: *** empty log message *** X-Git-Tag: v2.5.5~121 X-Git-Url: http://git.kpe.io/?a=commitdiff_plain;ds=sidebyside;h=859b1e7b0f6e92f3a555b79289ce806106a72804;hp=7c195b8519f680bcb64b02645e4110cb7082d914;p=lml.git r3744: *** empty log message *** --- diff --git a/debian/changelog b/debian/changelog index 2e7fee1..1757e72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-lml (2.0.2-1) unstable; urgency=low + + * Fix with-dir to properly evaluate parameters (Thanks Matthew Danish) + + -- Kevin M. Rosenberg Sat, 11 Jan 2003 21:02:23 -0700 + cl-lml (2.0.1-1) unstable; urgency=low * Quote class for link-c diff --git a/files.lisp b/files.lisp index fd2366b..bdf4e96 100644 --- a/files.lisp +++ b/files.lisp @@ -43,14 +43,20 @@ (parse-namestring f) f)))) -(defmacro with-dir ((output-dir &key sources) &body body) - (when (stringp output-dir) - (setq output-dir (parse-namestring output-dir))) - (unless sources - (setq sources output-dir)) - `(let ((*output-dir* ,output-dir) - (*sources-dir* ,sources)) - ,@body)) +(defmacro with-dir ((output &key sources) &body body) + (let ((output-dir (gensym)) + (sources-dir (gensym))) + `(let ((,output-dir ,output) + (,sources-dir ,sources)) + (when (stringp ,output-dir) + (setq ,output-dir (parse-namestring ,output-dir))) + (when (stringp ,sources-dir) + (setq ,sources-dir (parse-namestring ,sources-dir))) + (unless ,sources-dir + (setq ,sources-dir ,output-dir)) + (let ((*output-dir* ,output-dir) + (*sources-dir* ,sources-dir)) + ,@body)))) (defun lml-load-path (file) (if (probe-file file)