r10297: Automated commit for Debian build of lml upstream-version-2.5.3
[lml.git] / files.lisp
index cf1633f736eb1d63a2811f00989bb92d3d4bf285..fe3c4261a85004f4cd08d6245e728127ed979af5 100644 (file)
 
 (defvar *html-output* *standard-output*)
 
-(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*
-       (make-pathname :defaults (ecase type
-                                  (:source *sources-dir*)
-                                  (:output *output-dir*))
-                      :name `,(pathname-name f)
-                      :type `,(pathname-type f))
+(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*
+      (make-pathname :defaults (ecase type
+                                (:source *sources-dir*)
+                                (:output *output-dir*))
+                    :name (pathname-name f)
+                    :type (pathname-type f))
       (if (stringp f)
-         (parse-namestring f)
-       f))))
+         (nth-value 0 (parse-namestring f))
+         f)))
 
 (defmacro with-dir ((output &key sources) &body body)
   (let ((output-dir (gensym))