- defslot: register render functions into named slots with ordering - slot-render: call all registered render-fns for a slot - Slot modes designed (stack/replace/single-winner) but mode dispatch is implicit via the registration API - slot-p, clear-slot, list-slots for lifecycle management - Slots stored in a hash table keyed by string (equal test) - 4 tests, 100% passing
10 lines
138 B
Common Lisp
10 lines
138 B
Common Lisp
(defpackage :cl-tty.slot
|
|
(:use :cl)
|
|
(:export
|
|
#:defslot
|
|
#:slot-render
|
|
#:slot-p
|
|
#:clear-slot
|
|
#:list-slots
|
|
#:*slots*))
|