From 4d84f173efcfdaf4826378a34cab355dc8720d4f Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Mon, 28 Aug 2006 21:52:26 +0000 Subject: [PATCH] (Dynamic Wind): Reformat example a bit to avoid going off the right edge of the paper. Reported by Percy Tiglao. --- doc/ref/api-control.texi | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index 3d1549ecf..d5f68208e 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -1234,28 +1234,29 @@ non-locally, @var{out_guard} is called. If the dynamic extent of the dynamic-wind is re-entered, @var{in_guard} is called. Thus @var{in_guard} and @var{out_guard} may be called any number of times. + @lisp (define x 'normal-binding) @result{} x -(define a-cont (call-with-current-continuation - (lambda (escape) - (let ((old-x x)) - (dynamic-wind - ;; in-guard: - ;; - (lambda () (set! x 'special-binding)) +(define a-cont + (call-with-current-continuation + (lambda (escape) + (let ((old-x x)) + (dynamic-wind + ;; in-guard: + ;; + (lambda () (set! x 'special-binding)) - ;; thunk - ;; - (lambda () (display x) (newline) - (call-with-current-continuation escape) - (display x) (newline) - x) - - ;; out-guard: - ;; - (lambda () (set! x old-x))))))) + ;; thunk + ;; + (lambda () (display x) (newline) + (call-with-current-continuation escape) + (display x) (newline) + x) + ;; out-guard: + ;; + (lambda () (set! x old-x))))))) ;; Prints: special-binding ;; Evaluates to: