aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-07 15:34:28 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-07 15:34:28 +0200
commit9470b30951bc567fbe8d14fa0792bd01a86bfd64 (patch)
tree07b8fe181f695601362a8a20a2fee946ba11470f
parentExplicitly import copy-tree (needed since guile 3). (diff)
downloadcalp-9470b30951bc567fbe8d14fa0792bd01a86bfd64.tar.gz
calp-9470b30951bc567fbe8d14fa0792bd01a86bfd64.tar.xz
Remove accidental extra 'vcomponent control' module.
-rw-r--r--module/vcomponent/control.scm37
-rw-r--r--module/vcomponent/util/control.scm2
2 files changed, 1 insertions, 38 deletions
diff --git a/module/vcomponent/control.scm b/module/vcomponent/control.scm
deleted file mode 100644
index 19a6fa18..00000000
--- a/module/vcomponent/control.scm
+++ /dev/null
@@ -1,37 +0,0 @@
-(define-module (vcomponent util control)
- :use-module (hnh util)
- :use-module (vcomponent)
- :export (with-replaced-properties))
-
-
-(eval-when (expand load) ; No idea why I must have load here.
- (define href (make-procedure-with-setter hash-ref hash-set!))
-
- (define (set-temp-values! table component kvs)
- (for-each (lambda (kv)
- (let ((key (car kv))
- (val (cadr kv)))
- (when (prop component key)
- (set! (href table key) (prop component key))
- (set! (prop component key) val))))
- kvs))
-
- (define (restore-values! table component keys)
- (for-each (lambda (key)
- (and=> (href table key)
- (lambda (val)
- (set! (prop component key) val))))
- keys)))
-
-;; TODO what is this even used for?
-(define-syntax with-replaced-properties
- (syntax-rules ()
- [(G_ (component (key val) ...)
- body ...)
-
- (let ((htable (make-hash-table 10)))
- (dynamic-wind
- (lambda () (set-temp-values! htable component (quote ((key val) ...)))) ; In guard
- (lambda () body ...)
- (lambda () (restore-values! htable component (quote (key ...))))))])) ; Out guard
-
diff --git a/module/vcomponent/util/control.scm b/module/vcomponent/util/control.scm
index 0869543d..19a6fa18 100644
--- a/module/vcomponent/util/control.scm
+++ b/module/vcomponent/util/control.scm
@@ -26,7 +26,7 @@
;; TODO what is this even used for?
(define-syntax with-replaced-properties
(syntax-rules ()
- [(_ (component (key val) ...)
+ [(G_ (component (key val) ...)
body ...)
(let ((htable (make-hash-table 10)))