+(define-layered-function display-attribute (attribute)
+ (:method (attribute)
+ (display-using-description attribute *display* (attribute-object attribute))))
+
+
+(define-layered-function display-attribute-label (attribute)
+ (:method (attribute)
+ (funcall (attribute-label-formatter attribute) (attribute-label attribute))))
+
+(define-layered-function display-attribute-value (attribute)
+ (:method-combination arnesi:wrapping-standard)
+ (:method (attribute)
+ (flet ((disp (val &rest args)
+ (apply #'display *display* val
+ :activate (attribute-active-descriptions attribute)
+ :deactivate (attribute-inactive-descriptions attribute)
+ args)))
+
+
+ (let ((val (attribute-value attribute)))
+#+nil (break "display Attribute value: ~A with object ~A ~% Description ~A att-d ~A ~% VALUE ~A display on ~A"
+ attribute
+ (attribute-object attribute)
+ *description*
+ (attribute-description attribute)
+ val
+ *display*
+ )
+ (if (and (not (slot-boundp attribute 'active-attributes))
+ (equal val (attribute-object attribute)))
+ (progn (generic-format *display* "~A"(funcall (attribute-value-formatter attribute) val))
+ #+nil(break "using generic format because val is object and there is no active attributes."))
+
+ (with-active-descriptions (inline)
+ (cond ((slot-value attribute 'value-formatter)
+ (generic-format *display* "~A"(funcall (attribute-value-formatter attribute) val)))
+ ((slot-boundp attribute 'active-attributes)
+ (disp val :attributes (slot-value attribute 'active-attributes)))
+ (t
+ (disp val)))))))))
+
+(define-layered-method display-using-description
+ ((attribute standard-attribute) display object &rest args)
+ (declare (ignore args))
+ (when (attribute-label attribute)
+ (display-attribute-label attribute))
+ (display-attribute-value attribute))
+
+(define-layered-method display-attribute :around ((attribute standard-attribute))
+ (with-attribute-context (attribute)
+ (call-next-method))
+ #+nil(funcall-with-layer-context
+ (modify-layer-context (current-layer-context)
+ :activate (attribute-active-descriptions attribute)
+ :deactivate (attribute-inactive-descriptions attribute))
+ (lambda ()
+ (call-next-method))))
+
+(define-layered-method display-attribute :before
+ ((attribute standard-attribute))
+#+nil (break "Attribute : ~A with object ~A ~% Description ~A att-d ~A"
+ attribute
+ (attribute-object attribute)
+ *description*
+ (attribute-description attribute)
+))
+