Defer lookup of lazy-handler-dispatch.
authorNeil Jerram <neil@ossau.uklinux.net>
Wed, 19 Nov 2003 01:16:16 +0000 (01:16 +0000)
committerNeil Jerram <neil@ossau.uklinux.net>
Wed, 19 Nov 2003 01:16:16 +0000 (01:16 +0000)
ice-9/ChangeLog
ice-9/boot-9.scm

index 2cad1c1..71020ef 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-19  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * boot-9.scm (error-catching-loop): Defer lookup of
+       lazy-handler-dispatch.
+
 2003-11-17  Marius Vollmer  <mvo@zagadka.de>
 
        * boot-9.scm (@, @@): New macros.
index 3989f69..d65d99d 100644 (file)
                                            (loop (thunk)))
                                          #f)))))
 
-                                 lazy-handler-dispatch))
+                                 ;; Use a closure here rather than
+                                 ;; just `lazy-handler-dispatch' so
+                                 ;; that lookup of
+                                 ;; lazy-handler-dispatch's value is
+                                 ;; deferred until a throw occurs.
+                                 ;; This means that if code executed
+                                 ;; in the REPL just above set!s
+                                 ;; lazy-handler-dispatch, the new
+                                 ;; value will be used to handle the
+                                 ;; next throw from the REPL.
+                                 (lambda args
+                                   (apply lazy-handler-dispatch args))))
 
                    (lambda (key . args)
                      (case key