X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/blobdiff_plain/bd9c9c317657fe4d4cd1b7b4758f36b0f338ef3c..c29b2d2dda5ab82f7458666c154094693bfe9f1b:/src/attribute.lisp diff --git a/src/attribute.lisp b/src/attribute.lisp index 210b36d..d332f60 100644 --- a/src/attribute.lisp +++ b/src/attribute.lisp @@ -134,6 +134,12 @@ :layered t :special t))) +(define-layered-method attribute-active-p :around (attribute) + (let ((active? (call-next-method))) + (if (eq :when active?) + (not (null (attribute-value attribute))) + active?))) + (define-layered-method attribute-label-formatter :around (attribute) (or (slot-value attribute 'label-formatter) (attribute-value (find-attribute (attribute-description attribute) 'label-formatter))