[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
with-open-file
- To: <clisp-list@ma2s2.mathematik.uni-karlsruhe.de>
- Subject: with-open-file
- From: sshteingold@cctrading.com
- Date: Mon, 01 Dec 97 13:33:56 -0500
- Return-receipt-to: <sshteingold@cctrading.com>
> (macroexpand '(with-open-file (str "file" :direction :io) (format
str "zz")))
(let ((str (open "file" :direction :io)))
(unwind-protect
(multiple-value-prog1 (progn (format str "zz")) (when str (close
str)))
(when str (close str :abort t))
) ) ;
t
>
why close is done twice?
Why not just
(unwind-protect (progn ,@body) (when str (close str :abort t)))
?