mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
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.
This commit is contained in:
parent
736aff0086
commit
88e41e94d3
1 changed files with 10 additions and 8 deletions
|
@ -49,18 +49,20 @@
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_) *unspecified*)))
|
((_) *unspecified*)))
|
||||||
|
|
||||||
|
(define %call/ec-prompt
|
||||||
|
(make-prompt-tag))
|
||||||
|
|
||||||
(define-syntax call/ec
|
(define-syntax call/ec
|
||||||
;; aka. `call-with-escape-continuation'
|
;; aka. `call-with-escape-continuation'
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ proc)
|
((_ proc)
|
||||||
(let ((prompt (make-prompt-tag)))
|
(call-with-prompt %call/ec-prompt
|
||||||
(call-with-prompt prompt
|
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(proc (lambda args
|
(proc (lambda args
|
||||||
(apply abort-to-prompt
|
(apply abort-to-prompt
|
||||||
prompt args))))
|
%call/ec-prompt args))))
|
||||||
(lambda (_ . args)
|
(lambda (_ . args)
|
||||||
(apply values args)))))))
|
(apply values args))))))
|
||||||
|
|
||||||
(define-syntax let/ec
|
(define-syntax let/ec
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue