r8596: lml2 rework
[lml2.git] / files.lisp
index 7efb4e64a72db0bd2bcc4571817201c72d1c851c..445e5487c63b15e948d338b2dd2ba210ed4b6675 100644 (file)
       (unless (position #\. f)
        (setq f (concatenate 'string f ".html"))))
     (if *sources-dir*
-       (make-pathname :defaults (ecase type
-                                  (:source *sources-dir*)
-                                  (:output *output-dir*))
-                      :name `,(pathname-name f)
-                      :type `,(pathname-type f))
+       (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))))
@@ -74,5 +76,5 @@
 (defun lml-load (file)
   (lml-load-path (eval `(lml-file-name ,file :source))))
 
-(defun include-file (file)
+(defun insert-file (file)
   (print-file-contents file *html-stream*))