;;;; (http://www.gnu.org/licenses/gpl.html)
;;;; *************************************************************************
-(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
-(in-package :lml)
+(in-package #:lml)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar *output-dir* nil)
(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)
(with-open-file (in file :direction :input)
- (do ((form (read in nil 'lml::eof) (read in nil 'lml::eof)))
- ((eq form 'lml::eof))
+ (do ((form (read in nil 'eof) (read in nil 'eof)))
+ ((eq form 'eof))
(eval form)))
(format *trace-output* "Warning: unable to load LML file ~S" file)))