From a6624f11e2ae5b58d3cca7741a1c18c9aa29c96d Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 31 Jul 2009 16:00:15 +0000 Subject: [PATCH] better job of checking module language setting invariants when reading from the prefs file svn: r15649 --- collects/drscheme/private/module-language.ss | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/collects/drscheme/private/module-language.ss b/collects/drscheme/private/module-language.ss index 89a0932e88..6026d41dc1 100644 --- a/collects/drscheme/private/module-language.ss +++ b/collects/drscheme/private/module-language.ss @@ -116,7 +116,7 @@ (and (list? marshalled) (let ([marshalled-len (length marshalled)]) ;; older formats had no auto-text or compilation disabling - (and (<= 3 (length marshalled)) + (and (<= 3 marshalled-len) (let ([collection-paths (list-ref marshalled 1)] [command-line-args (list-ref marshalled 2)] [auto-text (if (<= marshalled-len 3) @@ -143,7 +143,14 @@ (list collection-paths command-line-args auto-text - compilation-on? + + ;; current versions of drscheme do not allow this combination + ;; in the first place (compilation is only allowed in 'none + ;; and 'debug mode), but older versions might. + (and (memq (drscheme:language:simple-settings-annotations super) + '(none debug)) + compilation-on?) + full-trace?))))))))))) (define/override (on-execute settings run-in-user-thread)