Commit 3f16d7f7 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Add proper ignorable declaration in with-temporary-file:

when there is an after body using the pathname,
the pathname can but need not be used in the before body.
parent 3574f2a5
......@@ -632,7 +632,9 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev
(beforef (gensym "BEFORE"))
(afterf (gensym "AFTER")))
`(flet (,@(when before
`((,beforef (,@(when streamp `(,stream)) ,@(when pathnamep `(,pathname))) ,@before)))
`((,beforef (,@(when streamp `(,stream)) ,@(when pathnamep `(,pathname)))
,@(when after `((declare (ignorable ,pathname))))
,@(when after
(assert pathnamep)
`((,afterf (,pathname) ,@after))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment