X-Git-Url: http://git.kpe.io/?p=lml.git;a=blobdiff_plain;f=2%2Ffiles.lisp;fp=2%2Ffiles.lisp;h=9c5dd2ed95906fb91ceb6749a3d62df9e59fc997;hp=db1a9b1827d2d76a33865d8fd4288cf8a9aa4d00;hb=b2d510a883e1e45b30a910d3deb4074858ef8474;hpb=c5d0bfa707f8c2249709c037339bf7a49364fb9d diff --git a/2/files.lisp b/2/files.lisp index db1a9b1..9c5dd2e 100644 --- a/2/files.lisp +++ b/2/files.lisp @@ -55,13 +55,14 @@ (*sources-dir* ,sources-dir)) ,@body)))) -(defun lml-load-path (file) +(defun lml-load-path (file &key optional) (if (probe-file file) (with-open-file (in file :direction :input) (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))) + (unless optional + (format *trace-output* "Warning: unable to load LML file ~S" file)))) (defun process-dir (dir &key sources) (with-dir (dir :sources sources) @@ -73,8 +74,8 @@ (format *trace-output* "~&; Processing ~A~%" file) (lml-load-path file))))) -(defun lml-load (file) - (lml-load-path (eval `(lml-file-name ,file :source)))) +(defun lml-load (file &key optional) + (lml-load-path (eval `(lml-file-name ,file :source)) :optional optional)) (defun insert-file (file) (print-file-contents file *html-stream*))