summaryrefslogtreecommitdiff
path: root/module/sxml
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-07-15 18:39:49 +0200
committerLudovic Courtès <ludo@gnu.org>2010-07-15 23:12:57 +0200
commit88e41e94d3b80de5f96f7044ed35f0e1137377fc (patch)
treefebbd85117cb7ed0decd70e7d1355091d718ad18 /module/sxml
parent736aff00863dc9e12a26e01aba63d29499c073ea (diff)
downloadguile-88e41e94d3b80de5f96f7044ed35f0e1137377fc.tar.gz
sxml-match: Always use the same prompt tag.
* module/sxml/match.scm (%call/ec-prompt): New variable. (call/ec): Use it instead of creating a new prompt tag.
Diffstat (limited to 'module/sxml')
-rw-r--r--module/sxml/match.scm18
1 files changed, 10 insertions, 8 deletions
diff --git a/module/sxml/match.scm b/module/sxml/match.scm
index d9d0285cf..9aebc019b 100644
--- a/module/sxml/match.scm
+++ b/module/sxml/match.scm
@@ -49,18 +49,20 @@
(syntax-rules ()
((_) *unspecified*)))
+(define %call/ec-prompt
+ (make-prompt-tag))
+
(define-syntax call/ec
;; aka. `call-with-escape-continuation'
(syntax-rules ()
((_ proc)
- (let ((prompt (make-prompt-tag)))
- (call-with-prompt prompt
- (lambda ()
- (proc (lambda args
- (apply abort-to-prompt
- prompt args))))
- (lambda (_ . args)
- (apply values args)))))))
+ (call-with-prompt %call/ec-prompt
+ (lambda ()
+ (proc (lambda args
+ (apply abort-to-prompt
+ %call/ec-prompt args))))
+ (lambda (_ . args)
+ (apply values args))))))
(define-syntax let/ec
(syntax-rules ()