diff --git a/src/utils.scm b/src/utils.scm index a272bba..24f7a9d 100644 --- a/src/utils.scm +++ b/src/utils.scm @@ -162,7 +162,7 @@ (define-enumerated-type option-type :option-type option-type? option-types option-type-name option-type-index (int number inexact exact string symbol font color colors - boolean symbol-list keys keys-list sexp)) + boolean symbol-list keys keys-list sexp binding-list)) (define-syntax define-options-spec (syntax-rules @@ -213,6 +213,13 @@ def))) ((eq? type (option-type sexp)) def) + ((eq? type (option-type binding-list)) + (and (check def list?) + (map (lambda (b) + (let ((k (allocate-option dpy colormap name + (option-type keys) (car b)))) + (cons k (cdr b)))) + def))) (else (error "option type not implemented" name type))))) ;; *** keys utilities ************************************************