Export portions of `lol-ucw'
[clinton/lisp-on-lines.git] / src / ucw / contextl-components.lisp
index 0f4465e..7d90db3 100644 (file)
@@ -1,5 +1,12 @@
 (in-package :lisp-on-lines-ucw)
 
+(defmacro dlambda ((&rest args) &body body)
+  (let ((env (gensym)))
+    `(let ((,env (capture-dynamic-environment)))
+       (lambda (,@args)
+        (with-dynamic-environment (,env)
+          ,@body)))))
+
 (defclass contextl-application (standard-application) 
   ()
   (:default-initargs 
@@ -23,7 +30,7 @@
   (with-dynamic-environment ((action-dynamic-environment action))
     (call-next-method)))
 
-(defmethod ucw-core:call-callbacks ((action contextl-action) frame request)
+(defmethod ucw-core:call-callbacks :around ((action contextl-action) frame request)
   (with-dynamic-environment ((action-dynamic-environment action))
     (call-next-method)))
 
@@ -40,7 +47,7 @@
              (call-next-method))))
 
 (defmethod/cc call-component :before ((from t) (to contextl-component))
- (setf (component-dynamic-environment to) (capture-dynamic-environment)))
 (setf (component-dynamic-environment to) (capture-dynamic-environment)))