diff options
-rw-r--r-- | module/ice-9/boot-9.scm | 7 | ||||
-rw-r--r-- | module/srfi/srfi-9.scm | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 8aef6db75..a5f2eea9b 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -4608,21 +4608,22 @@ when none is available, reading FILE-NAME with READER." '-procedure))) (syntax-case x () - ((_ (name formals ...) body ...) + ((_ (name formals ...) body0 body ...) (identifier? #'name) (with-syntax ((proc-name (make-procedure-name #'name)) ((args ...) (generate-temporaries #'(formals ...)))) #`(begin (define (proc-name formals ...) + #((maybe-unused)) (syntax-parameterize ((name (identifier-syntax proc-name))) - body ...)) + body0 body ...)) (define-syntax-parameter name (lambda (x) (syntax-case x () ((_ args ...) #'((syntax-parameterize ((name (identifier-syntax proc-name))) (lambda (formals ...) - body ...)) + body0 body ...)) args ...)) ((_ a (... ...)) (syntax-violation 'name "Wrong number of arguments" x)) diff --git a/module/srfi/srfi-9.scm b/module/srfi/srfi-9.scm index 9bb6e6971..1f1f5e4af 100644 --- a/module/srfi/srfi-9.scm +++ b/module/srfi/srfi-9.scm @@ -1,6 +1,6 @@ ;;; srfi-9.scm --- define-record-type -;; Copyright (C) 2001-2002, 2006, 2008-2014, 2018-2019 +;; Copyright (C) 2001-2002, 2006, 2008-2014, 2018-2019, 2023 ;; Free Software Foundation, Inc. ;; ;; This library is free software; you can redistribute it and/or @@ -108,20 +108,21 @@ '-procedure))) (syntax-case x () - ((_ ((key value) ...) (name formals ...) body ...) + ((_ ((key value) ...) (name formals ...) body0 body ...) (identifier? #'name) (with-syntax ((proc-name (make-procedure-name #'name)) ((args ...) (generate-temporaries #'(formals ...)))) #`(begin (define (proc-name formals ...) - body ...) + #((maybe-unused)) + body0 body ...) (define-syntax name (lambda (x) (syntax-case x (%%on-error key ...) ((_ (%%on-error err) key s) #'(ck s 'value)) ... ((_ args ...) #'((lambda (formals ...) - body ...) + body0 body ...) args ...)) ((_ a (... ...)) (syntax-violation 'name "Wrong number of arguments" x)) |