mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +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 ()
|
||||
((_) *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 ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue