aboutsummaryrefslogtreecommitdiff
path: root/module/util
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-06-01 22:04:38 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-06-01 22:04:38 +0200
commit040ce09735586ccc4073de82ac181b15df59bbc0 (patch)
tree68e5ea0b36cc1e37d757682ff52420e414b56333 /module/util
parentMinor comment changes. (diff)
downloadcalp-040ce09735586ccc4073de82ac181b15df59bbc0.tar.gz
calp-040ce09735586ccc4073de82ac181b15df59bbc0.tar.xz
Define method now actually sets current-app.
Diffstat (limited to 'module/util')
-rw-r--r--module/util/app.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/util/app.scm b/module/util/app.scm
index 67725a8c..9c1876d0 100644
--- a/module/util/app.scm
+++ b/module/util/app.scm
@@ -15,7 +15,8 @@
(define current-app (make-parameter (make-app)))
(define-syntax (define-method stx)
- (with-syntax ((app (datum->syntax stx 'app)))
+ (with-syntax ((app (datum->syntax stx 'app))
+ (current-app (datum->syntax stx 'current-app)))
(syntax-case stx ()
[(_ (name args ...) body ...)
@@ -23,7 +24,8 @@
#'(args ...))))
#`(define*-public (name #,@pre #,@(if (null? post) '(key:) post)
(app (current-app)))
- body ...))])))
+ (parameterize ((current-app app))
+ body ...)))])))
(define-method (getf field)