projects
/
lml2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automated commit for debian release 1.6.6-1
[lml2.git]
/
files.lisp
diff --git
a/files.lisp
b/files.lisp
index 9c5dd2ed95906fb91ceb6749a3d62df9e59fc997..068347c9f83ecd7d38ca14f7eec213fe5b735077 100644
(file)
--- a/
files.lisp
+++ b/
files.lisp
@@
-28,23
+28,23
@@
(unless (position #\. f)
(setq f (concatenate 'string f ".html"))))
(if (or (and (eq type :source) *sources-dir*)
(unless (position #\. f)
(setq f (concatenate 'string f ".html"))))
(if (or (and (eq type :source) *sources-dir*)
- (and (eq type :output) *output-dir*))
+
(and (eq type :output) *output-dir*))
(merge-pathnames
(make-pathname :name (pathname-name f)
(merge-pathnames
(make-pathname :name (pathname-name f)
- :type (pathname-type f)
- :directory (pathname-directory f))
+
:type (pathname-type f)
+
:directory (pathname-directory f))
(ecase type
(ecase type
- (:source *sources-dir*)
- (:output *output-dir*)))
+
(:source *sources-dir*)
+
(:output *output-dir*)))
(if (stringp f)
(if (stringp f)
- (parse-namestring f)
- f)))
+
(parse-namestring f)
+
f)))
(defmacro with-dir ((output &key sources) &body body)
(let ((output-dir (gensym))
(defmacro with-dir ((output &key sources) &body body)
(let ((output-dir (gensym))
- (sources-dir (gensym)))
+
(sources-dir (gensym)))
`(let ((,output-dir ,output)
`(let ((,output-dir ,output)
- (,sources-dir ,sources))
+
(,sources-dir ,sources))
(when (stringp ,output-dir)
(setq ,output-dir (parse-namestring ,output-dir)))
(when (stringp ,sources-dir)
(when (stringp ,output-dir)
(setq ,output-dir (parse-namestring ,output-dir)))
(when (stringp ,sources-dir)
@@
-52,27
+52,27
@@
(unless ,sources-dir
(setq ,sources-dir ,output-dir))
(let ((*output-dir* ,output-dir)
(unless ,sources-dir
(setq ,sources-dir ,output-dir))
(let ((*output-dir* ,output-dir)
- (*sources-dir* ,sources-dir))
+
(*sources-dir* ,sources-dir))
,@body))))
(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)))
,@body))))
(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)))
+
((eq form 'eof))
+
(eval form)))
(unless optional
(format *trace-output* "Warning: unable to load LML file ~S" file))))
(defun process-dir (dir &key sources)
(with-dir (dir :sources sources)
(let ((lml-files (directory
(unless optional
(format *trace-output* "Warning: unable to load LML file ~S" file))))
(defun process-dir (dir &key sources)
(with-dir (dir :sources sources)
(let ((lml-files (directory
- (make-pathname :defaults *sources-dir*
- :name :wild
- :type "lml"))))
+
(make-pathname :defaults *sources-dir*
+
:name :wild
+
:type "lml"))))
(dolist (file lml-files)
(dolist (file lml-files)
- (format *trace-output* "~&; Processing ~A~%" file)
- (lml-load-path file)))))
+
(format *trace-output* "~&; Processing ~A~%" file)
+
(lml-load-path file)))))
(defun lml-load (file &key optional)
(lml-load-path (eval `(lml-file-name ,file :source)) :optional optional))
(defun lml-load (file &key optional)
(lml-load-path (eval `(lml-file-name ,file :source)) :optional optional))