|
@@ -42,3 +42,9 @@ to see if it matches. PATHNAME version."
|
|
|
(if e
|
|
(if e
|
|
|
(string= (string-downcase e) (string-downcase ext))
|
|
(string= (string-downcase e) (string-downcase ext))
|
|
|
nil)))
|
|
nil)))
|
|
|
|
|
+
|
|
|
|
|
+(defmacro redirect (filename &rest body)
|
|
|
|
|
+ "Temporarily set *STANDARD-OUTPUT* to FILENAME and execute BODY."
|
|
|
|
|
+ `(let ((*standard-output* (open ,filename :direction :output :if-does-not-exist :create :if-exists :supersede)))
|
|
|
|
|
+ ,@body
|
|
|
|
|
+ (finish-output *standard-output*)))
|