X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=files.lisp;h=a3dbf6ee34fee826e1df9c29d77bdf1ac6907f09;hb=e3aa524ecacacd9b1d56f623980cd30bb045e308;hp=445e5487c63b15e948d338b2dd2ba210ed4b6675;hpb=0f37aaf4b8b559025d0ea7f38754d04712fd5541;p=lml2.git diff --git a/files.lisp b/files.lisp index 445e548..a3dbf6e 100644 --- a/files.lisp +++ b/files.lisp @@ -19,26 +19,25 @@ (defvar *sources-dir* nil) ) -(defmacro lml-file-name (file &optional (type :source)) - (let ((f file)) - (when (and (consp f) (eql (car f) 'cl:quote)) - (setq f (cadr f))) - (when (symbolp f) - (setq f (string-downcase (symbol-name f)))) - (when (stringp f) - (unless (position #\. f) - (setq f (concatenate 'string f ".html")))) - (if *sources-dir* - (merge-pathnames - (make-pathname :name `,(pathname-name f) - :type `,(pathname-type f) - :directory `,(pathname-directory f)) - (ecase type - (:source *sources-dir*) - (:output *output-dir*))) +(defun lml-file-name (f &optional (type :source)) + (when (and (consp f) (eql (car f) 'cl:quote)) + (setq f (cadr f))) + (when (symbolp f) + (setq f (string-downcase (symbol-name f)))) + (when (stringp f) + (unless (position #\. f) + (setq f (concatenate 'string f ".html")))) + (if *sources-dir* + (merge-pathnames + (make-pathname :name (pathname-name f) + :type (pathname-type f) + :directory (pathname-directory f)) + (ecase type + (:source *sources-dir*) + (:output *output-dir*))) (if (stringp f) (parse-namestring f) - f)))) + f))) (defmacro with-dir ((output &key sources) &body body) (let ((output-dir (gensym))