tons of small changes to bring this up to date with maxclaims 2.0
[clinton/lisp-on-lines.git] / src / display.lisp
index 7de1c63..6078e83 100644 (file)
   (dolist (d activate context)
     (setf context (adjoin-layer (find-description d)
                                context))))
-  
-
 
+(defun funcall-with-attribute-context (attribute thunk)
+  (funcall-with-layer-context 
+   (modify-layer-context (current-layer-context) 
+                        :activate (attribute-active-descriptions attribute)
+                        :deactivate (attribute-inactive-descriptions attribute))
+   thunk))
 
+(defmacro with-attribute-context ((attribute) &body body)
+  `(funcall-with-attribute-context ,attribute (lambda () ,@body)))
+  
+  
 (defun display (display object &rest args &key deactivate activate &allow-other-keys)
 
   (funcall-with-layer-context 
@@ -42,8 +50,6 @@
 
 
 
-
-
 (defun display/d (&rest args)
   (apply #'display-using-description args))