diff options
Diffstat (limited to '')
-rw-r--r-- | module/calp/terminal.scm | 3 | ||||
-rw-r--r-- | module/calp/util/config.scm | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/module/calp/terminal.scm b/module/calp/terminal.scm index cd1d0c9d..c83e76ce 100644 --- a/module/calp/terminal.scm +++ b/module/calp/terminal.scm @@ -31,6 +31,9 @@ #:export (main-loop)) + +;;; TODO change all hard coded escape sequences to proper markup + (define-values (height width) (get-terminal-size)) (define (open-in-editor fname) diff --git a/module/calp/util/config.scm b/module/calp/util/config.scm index 2fe2b9b0..8ecd7a81 100644 --- a/module/calp/util/config.scm +++ b/module/calp/util/config.scm @@ -37,6 +37,7 @@ (define (define-config% name default-value kwargs) (for (key value) in (group kwargs 2) + ;; TODO un-smart this (set! ((or (hashq-ref config-properties key) (error "Missing config protperty slot " key)) name) @@ -64,6 +65,7 @@ (if (eq? default %uniq) (let ((v (hashq-ref config-values key %uniq))) (when (eq? v %uniq) + ;; TODO throw descript error (error "Missing config" key)) v) (hashq-ref config-values key default))) @@ -71,8 +73,8 @@ (define-public ((ensure predicate) value) - (if (not (predicate value)) - #f value)) + (if (predicate value) + value #f)) @@ -106,6 +108,8 @@ (export format-procedure) +;; TODO break this up into separate `get-all-configuration-items' and +;; `format-configuration-items' procedures (define-public (get-configuration-documentation) (define groups (group-by (compose source-module car) |