fix make-gui-namespace from scheme/gui/base and racket/gui/base
so that the namespace starts with scheme/base or racket/base respectively
This commit is contained in:
parent
6b24320ea7
commit
1712dfb7f5
|
@ -1,5 +1,5 @@
|
||||||
(module mred mzscheme
|
(module mred mzscheme
|
||||||
(require (only scheme/base
|
(require (only racket/base
|
||||||
define-namespace-anchor
|
define-namespace-anchor
|
||||||
namespace-anchor->empty-namespace
|
namespace-anchor->empty-namespace
|
||||||
make-base-empty-namespace)
|
make-base-empty-namespace)
|
||||||
|
@ -57,6 +57,9 @@
|
||||||
(wx:set-dialogs get-file put-file get-ps-setup-from-user message-box)
|
(wx:set-dialogs get-file put-file get-ps-setup-from-user message-box)
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; These functions are re-implemented in scheme/gui/base
|
||||||
|
;; and racket/gui/base to attach those names, instead of
|
||||||
|
;; just 'mred.
|
||||||
|
|
||||||
(define-namespace-anchor anchor)
|
(define-namespace-anchor anchor)
|
||||||
|
|
||||||
|
@ -75,6 +78,8 @@
|
||||||
(namespace-require 'scheme/class))
|
(namespace-require 'scheme/class))
|
||||||
ns))
|
ns))
|
||||||
|
|
||||||
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(define (make-eventspace)
|
(define (make-eventspace)
|
||||||
(parameterize ([wx:the-snip-class-list (wx:make-the-snip-class-list)]
|
(parameterize ([wx:the-snip-class-list (wx:make-the-snip-class-list)]
|
||||||
[wx:the-editor-data-class-list (wx:make-the-editor-data-class-list)])
|
[wx:the-editor-data-class-list (wx:make-the-editor-data-class-list)])
|
||||||
|
|
|
@ -1,4 +1,25 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
|
(require (except-in mred
|
||||||
|
make-gui-namespace
|
||||||
|
make-gui-empty-namespace))
|
||||||
|
|
||||||
(require mred)
|
(provide (all-from-out mred)
|
||||||
(provide (all-from-out mred))
|
make-gui-namespace
|
||||||
|
make-gui-empty-namespace)
|
||||||
|
|
||||||
|
(define-namespace-anchor anchor)
|
||||||
|
|
||||||
|
(define (make-gui-empty-namespace)
|
||||||
|
(let ([ns (make-base-empty-namespace)])
|
||||||
|
(namespace-attach-module (namespace-anchor->empty-namespace anchor)
|
||||||
|
'racket/gui/base
|
||||||
|
ns)
|
||||||
|
ns))
|
||||||
|
|
||||||
|
(define (make-gui-namespace)
|
||||||
|
(let ([ns (make-gui-empty-namespace)])
|
||||||
|
(parameterize ([current-namespace ns])
|
||||||
|
(namespace-require 'racket/base)
|
||||||
|
(namespace-require 'racket/gui/base)
|
||||||
|
(namespace-require 'racket/class))
|
||||||
|
ns))
|
||||||
|
|
|
@ -1,2 +1,25 @@
|
||||||
#lang scheme/private/provider
|
#lang scheme/base
|
||||||
racket/gui/base
|
(require (except-in mred
|
||||||
|
make-gui-namespace
|
||||||
|
make-gui-empty-namespace))
|
||||||
|
|
||||||
|
(provide (all-from-out mred)
|
||||||
|
make-gui-namespace
|
||||||
|
make-gui-empty-namespace)
|
||||||
|
|
||||||
|
(define-namespace-anchor anchor)
|
||||||
|
|
||||||
|
(define (make-gui-empty-namespace)
|
||||||
|
(let ([ns (make-base-empty-namespace)])
|
||||||
|
(namespace-attach-module (namespace-anchor->empty-namespace anchor)
|
||||||
|
'scheme/gui/base
|
||||||
|
ns)
|
||||||
|
ns))
|
||||||
|
|
||||||
|
(define (make-gui-namespace)
|
||||||
|
(let ([ns (make-gui-empty-namespace)])
|
||||||
|
(parameterize ([current-namespace ns])
|
||||||
|
(namespace-require 'scheme/base)
|
||||||
|
(namespace-require 'scheme/gui/base)
|
||||||
|
(namespace-require 'scheme/class))
|
||||||
|
ns))
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
|
|
||||||
(module common scheme/base
|
(module common racket/base
|
||||||
(require scribble/manual
|
(require scribble/manual
|
||||||
scribble/basic
|
scribble/basic
|
||||||
scheme/class
|
racket/class
|
||||||
scheme/contract
|
racket/contract
|
||||||
"blurbs.ss"
|
"blurbs.ss"
|
||||||
(only-in "../reference/mz.ss" AllUnix exnraise))
|
(only-in "../reference/mz.ss" AllUnix exnraise))
|
||||||
(provide (all-from-out scribble/manual)
|
(provide (all-from-out scribble/manual)
|
||||||
(all-from-out scribble/basic)
|
(all-from-out scribble/basic)
|
||||||
(all-from-out scheme/class)
|
(all-from-out racket/class)
|
||||||
(all-from-out scheme/contract)
|
(all-from-out racket/contract)
|
||||||
(all-from-out "blurbs.ss")
|
(all-from-out "blurbs.ss")
|
||||||
(all-from-out "../reference/mz.ss"))
|
(all-from-out "../reference/mz.ss"))
|
||||||
|
|
||||||
(require (for-label scheme/gui/base
|
(require (for-label racket/gui/base
|
||||||
scheme/class
|
racket/class
|
||||||
scheme/contract
|
racket/contract
|
||||||
scheme/base))
|
racket/base))
|
||||||
(provide (for-label (all-from-out scheme/gui/base)
|
(provide (for-label (all-from-out racket/gui/base)
|
||||||
(all-from-out scheme/class)
|
(all-from-out racket/class)
|
||||||
(all-from-out scheme/contract)
|
(all-from-out racket/contract)
|
||||||
(all-from-out scheme/base))))
|
(all-from-out racket/base))))
|
||||||
|
|
||||||
|
|
|
@ -267,12 +267,12 @@ Strips shortcut ampersands from @racket[label], removes parenthesized
|
||||||
@defproc[(make-gui-empty-namespace) namespace?]{
|
@defproc[(make-gui-empty-namespace) namespace?]{
|
||||||
|
|
||||||
Like @racket[make-base-empty-namespace], but with
|
Like @racket[make-base-empty-namespace], but with
|
||||||
@racket[racket/class] and @racketmodname[racket/gui/base] also
|
@racketmodname[racket/class] and @racketmodname[racket/gui/base] also
|
||||||
attached to the result namespace.}
|
attached to the result namespace.}
|
||||||
|
|
||||||
@defproc[(make-gui-namespace) namespace?]{
|
@defproc[(make-gui-namespace) namespace?]{
|
||||||
|
|
||||||
Like @racket[make-base-namespace], but with @racket[racket/class] and
|
Like @racket[make-base-namespace], but with @racketmodname[racket/class] and
|
||||||
@racketmodname[racket/gui/base] also required into the top-level
|
@racketmodname[racket/gui/base] also required into the top-level
|
||||||
environment of the result namespace.}
|
environment of the result namespace.}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
(only-in scheme/class printable<%>)
|
(only-in scheme/class printable<%>)
|
||||||
(only-in racket/class writable<%>)
|
(only-in racket/class writable<%>)
|
||||||
(only-in racket/base struct hash hasheq hasheqv in-directory local-require)
|
(only-in racket/base struct hash hasheq hasheqv in-directory local-require)
|
||||||
|
(only-in scheme/gui/base make-gui-namespace make-gui-empty-namespace)
|
||||||
scheme/gui/base
|
scheme/gui/base
|
||||||
scheme/sandbox))
|
scheme/sandbox))
|
||||||
|
|
||||||
|
@ -143,13 +144,36 @@ must occur after all the @scheme[provide*] forms to which it refers.}
|
||||||
@compat[scheme/function racket/function]
|
@compat[scheme/function racket/function]
|
||||||
@compat[scheme/future racket/future]
|
@compat[scheme/future racket/future]
|
||||||
@compat[scheme/generator racket/generator]
|
@compat[scheme/generator racket/generator]
|
||||||
|
|
||||||
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@compat-except[scheme/gui racket/gui]{, except that it builds on
|
@compat-except[scheme/gui racket/gui]{, except that it builds on
|
||||||
|
@schememodname[scheme/gui/base] instead of @schememodname[racket/gui/base]}
|
||||||
|
|
||||||
|
@compat-except[scheme/gui/base racket/gui/base]{, except that it builds on
|
||||||
@schememodname[scheme] instead of @schememodname[racket]}
|
@schememodname[scheme] instead of @schememodname[racket]}
|
||||||
@compat[scheme/gui/base racket/gui/base]
|
|
||||||
|
@defproc[(make-gui-empty-namespace) namespace?]{
|
||||||
|
|
||||||
|
Like @racket[make-base-empty-namespace], but with
|
||||||
|
@racketmodname[scheme/class] and @racketmodname[scheme/gui/base] also
|
||||||
|
attached to the result namespace.}
|
||||||
|
|
||||||
|
@defproc[(make-gui-namespace) namespace?]{
|
||||||
|
|
||||||
|
Like @racket[make-base-namespace], but with @racketmodname[scheme/class] and
|
||||||
|
@racketmodname[scheme/gui/base] also required into the top-level
|
||||||
|
environment of the result namespace.}
|
||||||
|
|
||||||
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@compat[scheme/gui/dynamic racket/gui/dynamic]
|
@compat[scheme/gui/dynamic racket/gui/dynamic]
|
||||||
@compat[scheme/help racket/help]
|
@compat[scheme/help racket/help]
|
||||||
@compat[scheme/include racket/include]
|
@compat[scheme/include racket/include]
|
||||||
@compat[scheme/init racket/init]
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@compat-except[scheme/init racket/init]{, except that it builds on
|
||||||
|
@racketmodname[scheme] instead pf @racketmodname[racket]}
|
||||||
|
|
||||||
@;------------------------------------------------------------------------
|
@;------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -319,4 +343,19 @@ and @|make-module-evaluator-id| from @racketmodname[racket/sandbox].}
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
|
|
||||||
|
@section[@schememodname[mred]]
|
||||||
|
@defmodule[mred]
|
||||||
|
|
||||||
|
The @schememodname[mred] library is like
|
||||||
|
@schememodname[scheme/gui/base], except that it provides variants of
|
||||||
|
@racket[make-gui-namespace] and @racket[make-gui-empty-namespace] that
|
||||||
|
attach @schememodname[mred] instead of
|
||||||
|
@schememodname[scheme/gui/base].
|
||||||
|
|
||||||
|
Both @schememodname[scheme/gui/base] and
|
||||||
|
@schememodname[racket/gui/base] depend on @schememodname[mred], so it
|
||||||
|
is attached by all variants of @racket[make-gui-empty-namespace].
|
||||||
|
|
||||||
|
@; ----------------------------------------
|
||||||
|
|
||||||
@include-section["compat.scrbl"]
|
@include-section["compat.scrbl"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user