From 3f16d7f70817438849ee5f723ef6ad156dcf37ce Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Sun, 18 May 2014 04:29:45 -0400
Subject: [PATCH] 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.

---
 uiop/stream.lisp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/uiop/stream.lisp b/uiop/stream.lisp
index bd0f8c318..7103dbdf8 100644
--- a/uiop/stream.lisp
+++ b/uiop/stream.lisp
@@ -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))))
+                       ,@before)))
               ,@(when after
                   (assert pathnamep)
                   `((,afterf (,pathname) ,@after))))
-- 
GitLab