From 86aca47da2ecfaf6353e7952c94cbe3ad20c8290 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 17 Mar 1993 04:04:25 +0000 Subject: [PATCH] Improve error message for NAMED option without TYPE option. --- v7/src/runtime/defstr.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/v7/src/runtime/defstr.scm b/v7/src/runtime/defstr.scm index af304271b..55d486ed6 100644 --- a/v7/src/runtime/defstr.scm +++ b/v7/src/runtime/defstr.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: defstr.scm,v 14.23 1993/03/07 20:56:20 cph Exp $ +$Id: defstr.scm,v 14.24 1993/03/17 04:04:25 cph Exp $ Copyright (c) 1988-93 Massachusetts Institute of Technology @@ -263,13 +263,13 @@ differences: (named-seen? (assq 'NAMED options-seen))) (let ((named? (or (not type-seen?) named-seen?))) (if (not type-seen?) - (begin - (if (and named-seen? (not type-name)) - (error "Illegal structure option:" (cdr named-seen?))) - (let ((initial-offset-seen? (assq 'INITIAL-OFFSET options-seen))) - (if initial-offset-seen? - (error "Structure option illegal without TYPE option:" - (cdr initial-offset-seen?)))))) + (let ((check-option + (lambda (seen?) + (if seen? + (error "Structure option illegal without TYPE option:" + (cdr seen?)))))) + (check-option (and (not type-name) named-seen?)) + (check-option (assq 'INITIAL-OFFSET options-seen)))) (if (not named?) (let ((check (lambda (option-seen) -- 2.25.1