(defun flag-value (flag &optional (fs *current-flag-system*))
(if (not fs)
0
(multiple-value-bind (value present)
(gethash flag (flag-system-flags fs))
(if present
value
(flag-value flag (find-flag-system (flag-system-parent fs)))))))Source Context