Macro: FLAGS

Documentation

creates code using a flag-system and a list of args.
All functions using this macros must be recompiled if
they're using flags being redefined in a flag-system
after compilation.
Uses *current-flag-system*... use with-flag-system
if you need to use another flag-system within this macro

Source

(defmacro flags (&rest args)
"creates code using a flag-system and a list of args.
All functions using this macros must be recompiled if
they're using flags being redefined in a flag-system
after compilation.
Uses *current-flag-system*... use with-flag-system
if you need to use another flag-system within this macro"
`(logior ,@(mapcar (lambda (expr)
(if-bind val (flag-value (first expr))
`(if ,(second expr) ,val 0)
(error "unknown flag: ~A" (first expr))))
(group args 2))))