fix 'gui-dynamic?' more

svn: r9983
This commit is contained in:
Matthew Flatt 2008-05-27 18:34:42 +00:00
parent 1db5280102
commit 69f4097020
3 changed files with 8 additions and 4 deletions

View File

@ -4,4 +4,8 @@
;; It is required by mred/mred so that it gets carried
;; along when mred/mred is attached to a new namespace.
(provide kernel-initialized)
(dynamic-require ''#%mred-kernel #f)
(define kernel-initialized 'done)

View File

@ -5,8 +5,8 @@
(define (gui-available?)
(with-handlers ([exn:fail? (lambda (exn) #f)])
(dynamic-require 'mred/private/dynamic #f)
#t))
(eq? (dynamic-require 'mred/private/dynamic 'kernel-initialized)
'done)))
(define-namespace-anchor anchor)

View File

@ -3045,9 +3045,9 @@ static Scheme_Module *module_load(Scheme_Object *name, Scheme_Env *env, const ch
if (!m) {
char *mred_note;
if (!strcmp(SCHEME_SYM_VAL(name), "#%mred-kernel")
if (!strcmp(SCHEME_SYM_VAL(SCHEME_PTR_VAL(name)), "#%mred-kernel")
&& !(scheme_strncmp(scheme_banner(), "Welcome to MzScheme", 19)))
mred_note = "; need to run in MrEd instead of MzScheme";
mred_note = "; need to run in mred instead of mzscheme";
else
mred_note = "";