mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
hygienic with-backtrace
* module/system/repl/repl.scm (with-backtrace): Make a syntax-rules macro.
This commit is contained in:
parent
dc232ed059
commit
11da3f2bd6
1 changed files with 4 additions and 2 deletions
|
@ -89,8 +89,10 @@
|
||||||
default-catch-handler
|
default-catch-handler
|
||||||
debug-pre-unwind-handler))
|
debug-pre-unwind-handler))
|
||||||
|
|
||||||
(define-macro (with-backtrace form)
|
(define-syntax with-backtrace
|
||||||
`(call-with-backtrace (lambda () ,form)))
|
(syntax-rules ()
|
||||||
|
((_ form)
|
||||||
|
(call-with-backtrace (lambda () form)))))
|
||||||
|
|
||||||
(define* (start-repl #:optional (lang (current-language)) #:key
|
(define* (start-repl #:optional (lang (current-language)) #:key
|
||||||
(level (1+ (or (fluid-ref *repl-level*) -1)))
|
(level (1+ (or (fluid-ref *repl-level*) -1)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue