From: stassats <sta...@us...> - 2014-05-28 21:31:09
|
The branch "master" has been updated in SBCL: via c1b73314f7bf7a724f82dee88644555657bfc78b (commit) from e5cd3c0ad84fbae74b1fb8272f163c96535a8ac0 (commit) - Log ----------------------------------------------------------------- commit c1b73314f7bf7a724f82dee88644555657bfc78b Author: Stas Boukarev <sta...@gm...> Date: Thu May 29 01:01:27 2014 +0400 WITH-SIMPLE-RESTART: don't clobber STREAM variable in report-function. This one is 24+ old, before CMUCL VCS history. Reported by _death on #lisp. --- src/code/defboot.lisp | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index 5eddd4f..d7008d2 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -585,14 +585,15 @@ evaluated as a PROGN." If restart-name is not invoked, then all values returned by forms are returned. If control is transferred to this restart, it immediately returns the values NIL and T." - `(restart-case - ;; If there's just one body form, then don't use PROGN. This allows - ;; RESTART-CASE to "see" calls to ERROR, etc. - ,(if (= (length forms) 1) (car forms) `(progn ,@forms)) - (,restart-name () - :report (lambda (stream) - (format stream ,format-string ,@format-arguments)) - (values nil t)))) + (let ((stream (gensym "STREAM"))) + `(restart-case + ;; If there's just one body form, then don't use PROGN. This allows + ;; RESTART-CASE to "see" calls to ERROR, etc. + ,(if (= (length forms) 1) (car forms) `(progn ,@forms)) + (,restart-name () + :report (lambda (,stream) + (format ,stream ,format-string ,@format-arguments)) + (values nil t))))) (defmacro-mundanely %handler-bind (bindings form) ;; As an optimization, this looks at the handler parts of BINDINGS ----------------------------------------------------------------------- hooks/post-receive -- SBCL |