diff options
Diffstat (limited to 'module/ice-9/psyntax.scm')
-rw-r--r-- | module/ice-9/psyntax.scm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm index b2f7c54b1..0323c1e3e 100644 --- a/module/ice-9/psyntax.scm +++ b/module/ice-9/psyntax.scm @@ -301,7 +301,7 @@ (define (decorate-source e s) - (if (and (pair? e) s) + (if (and s (supports-source-properties? e)) (set-source-properties! e s)) e) @@ -463,14 +463,11 @@ (define source-annotation (lambda (x) - (cond - ((syntax-object? x) - (source-annotation (syntax-object-expression x))) - ((pair? x) (let ((props (source-properties x))) - (if (pair? props) - props - #f))) - (else #f)))) + (let ((props (source-properties + (if (syntax-object? x) + (syntax-object-expression x) + x)))) + (and (pair? props) props)))) (define-syntax-rule (arg-check pred? e who) (let ((x e)) |