From ae745a38b80ff1756360fe5b4f1de86f92628a4f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 24 Jun 2026 03:39:14 +0100 Subject: utils: Drop support for #:allow-other-keys. Drop support for #:allow-other-keys in lambda** and syntax-lambda**. We do not use #:allow-other-keys anywhere; simplify by dropping it. Modify behaviour with unknown keys thus: raise an &unrecognized-keyword-assertion, but continue evaluation as though #:allow-other-keys was specified. --- tests/utils.scm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/utils.scm b/tests/utils.scm index f3d9abd..7ca73b8 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -89,11 +89,13 @@ '(lambda** (#:key foo #:foo bar) foo)))) -(test-equal "Allow other keys in lambda**" +(test-equal "Allow other keys in lambda**, but raise an exception" 1 - ((lambda** (#:key foo #:allow-other-keys) - foo) - #:foo 1 #:bar 2)) + (with-exception-handler (const #t) + (lambda () + ((lambda** (#:key foo) + foo) + #:foo 1 #:bar 2)))) (test-assert "Unrecognized keyword argument passed to lambda** should raise an &unrecognized-keyword-assertion condition" (guard (exception @@ -138,11 +140,13 @@ ((syntax-lambda** (#:key* foo) foo))) -(test-equal "Allow other keys in syntax-lambda**" +(test-equal "Allow other keys in syntax-lambda**, but raise an exception" 1 - (syntax->datum ((syntax-lambda** (#:key foo #:allow-other-keys) - foo) - #'#:foo #'1 #'#:bar #'2))) + (syntax->datum (with-exception-handler (const #t) + (lambda () + ((syntax-lambda** (#:key foo) + foo) + #'#:foo #'1 #'#:bar #'2))))) (test-assert "syntax-lambda** should raise an &unrecognized-keyword-assertion on unrecognized keywords in arguments" (guard (exception -- cgit 1.4.1