Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -632,7 +632,9 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev ...@@ -632,7 +632,9 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev
(beforef (gensym "BEFORE")) (beforef (gensym "BEFORE"))
(afterf (gensym "AFTER"))) (afterf (gensym "AFTER")))
`(flet (,@(when before `(flet (,@(when before
`((,beforef (,@(when streamp `(,stream)) ,@(when pathnamep `(,pathname))) ,@before))) `((,beforef (,@(when streamp `(,stream)) ,@(when pathnamep `(,pathname)))
,@(when after `((declare (ignorable ,pathname))))
,@before)))
,@(when after ,@(when after
(assert pathnamep) (assert pathnamep)
`((,afterf (,pathname) ,@after)))) `((,afterf (,pathname) ,@after))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment