diff --git a/collects/drscheme/acks.rkt b/collects/drracket/acks.rkt similarity index 100% rename from collects/drscheme/acks.rkt rename to collects/drracket/acks.rkt diff --git a/collects/drscheme/arrow.rkt b/collects/drracket/arrow.rkt similarity index 100% rename from collects/drscheme/arrow.rkt rename to collects/drracket/arrow.rkt diff --git a/collects/drscheme/default-code-style.rkt b/collects/drracket/default-code-style.rkt similarity index 100% rename from collects/drscheme/default-code-style.rkt rename to collects/drracket/default-code-style.rkt diff --git a/collects/drscheme/doc.icns b/collects/drracket/doc.icns similarity index 100% rename from collects/drscheme/doc.icns rename to collects/drracket/doc.icns diff --git a/collects/drracket/drracket.creator b/collects/drracket/drracket.creator new file mode 100644 index 0000000000..8e31ad43ae --- /dev/null +++ b/collects/drracket/drracket.creator @@ -0,0 +1,2 @@ +DrSc +(This code is registered with Apple.) diff --git a/collects/drscheme/drscheme.filetypes b/collects/drracket/drracket.filetypes similarity index 100% rename from collects/drscheme/drscheme.filetypes rename to collects/drracket/drracket.filetypes diff --git a/collects/drracket/drracket.rkt b/collects/drracket/drracket.rkt new file mode 100644 index 0000000000..be94819ab1 --- /dev/null +++ b/collects/drracket/drracket.rkt @@ -0,0 +1,67 @@ +#lang racket/base +(require scheme/gui/base "private/key.rkt") + +(define debugging? (getenv "PLTDRDEBUG")) +(define profiling? (getenv "PLTDRPROFILE")) + +(define install-cm? (and (not debugging?) + (getenv "PLTDRCM"))) + +(define cm-trace? (or (equal? (getenv "PLTDRCM") "trace") + (equal? (getenv "PLTDRDEBUG") "trace"))) + + +;; the flush is only here to ensure that the output is +;; appears when running in cygwin under windows. +(define (flprintf fmt . args) + (apply printf fmt args) + (flush-output)) + +(when debugging? + (flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n") + (let-values ([(zo-compile + make-compilation-manager-load/use-compiled-handler + manager-trace-handler) + (parameterize ([current-namespace (make-base-empty-namespace)] + [use-compiled-file-paths '()]) + (values + (dynamic-require 'errortrace/zo-compile 'zo-compile) + (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) + (dynamic-require 'compiler/cm 'manager-trace-handler)))]) + (current-compile zo-compile) + (use-compiled-file-paths (list (build-path "compiled" "errortrace"))) + (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) + (error-display-handler (dynamic-require 'errortrace/errortrace-lib + 'errortrace-error-display-handler)) + (when cm-trace? + (flprintf "PLTDRDEBUG: enabling CM tracing\n") + (manager-trace-handler + (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) + +(when install-cm? + (flprintf "PLTDRCM: installing compilation manager\n") + (let-values ([(make-compilation-manager-load/use-compiled-handler + manager-trace-handler) + (parameterize ([current-namespace (make-base-empty-namespace)]) + (values + (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) + (dynamic-require 'compiler/cm 'manager-trace-handler)))]) + (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) + (when cm-trace? + (flprintf "PLTDRCM: enabling CM tracing\n") + (manager-trace-handler + (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) + +(when profiling? + (flprintf "PLTDRPROFILE: installing profiler\n") + ;; NOTE that this might not always work. + ;; it creates a new custodian and installs it, but the + ;; original eventspace was created on the original custodian + ;; and this code does not create a new eventspace. + (let ([orig-cust (current-custodian)] + [orig-eventspace (current-eventspace)] + [new-cust (make-custodian)]) + (current-custodian new-cust) + ((dynamic-require 'drracket/private/profile-drs 'start-profile) orig-cust))) + +(dynamic-require 'drracket/private/drracket-normal #f) diff --git a/collects/drscheme/drscheme.utiexports b/collects/drracket/drracket.utiexports similarity index 100% rename from collects/drscheme/drscheme.utiexports rename to collects/drracket/drracket.utiexports diff --git a/collects/drracket/info.rkt b/collects/drracket/info.rkt new file mode 100644 index 0000000000..5d60e1b27a --- /dev/null +++ b/collects/drracket/info.rkt @@ -0,0 +1,10 @@ +#lang setup/infotab + +;(define tools '("sprof.rkt")) +;(define tool-names '("Sampling Profiler")) + +(define drracket-tools '("syncheck.rkt")) +(define drracket-tool-names '("Check Syntax")) + +(define gracket-launcher-names '("DrRacket")) +(define gracket-launcher-libraries '("drracket.rkt")) diff --git a/collects/drscheme/installer.rkt b/collects/drracket/installer.rkt similarity index 73% rename from collects/drscheme/installer.rkt rename to collects/drracket/installer.rkt index 2b6f6dd15e..1ffaaf40da 100644 --- a/collects/drscheme/installer.rkt +++ b/collects/drracket/installer.rkt @@ -14,8 +14,8 @@ (define (install-variation variant) (parameterize ([current-launcher-variant variant]) (make-mred-launcher - (list "-ZmvqL" "drscheme.rkt" "drscheme") + (list "-ZmvqL" "drracket.rkt" "drracket") (mred-program-launcher-path "DrScheme") (cons - `(exe-name . "DrScheme") - (build-aux-from-path (build-path (collection-path "drscheme") "drscheme")))))) + `(exe-name . "DrRacket") + (build-aux-from-path (build-path (collection-path "drracket") "drracket")))))) diff --git a/collects/drracket/main.rkt b/collects/drracket/main.rkt new file mode 100644 index 0000000000..1092b93c17 --- /dev/null +++ b/collects/drracket/main.rkt @@ -0,0 +1,2 @@ +#lang racket/base +(require "drracket.rkt") diff --git a/collects/drscheme/pltdoc.icns b/collects/drracket/pltdoc.icns similarity index 100% rename from collects/drscheme/pltdoc.icns rename to collects/drracket/pltdoc.icns diff --git a/collects/drscheme/private/app.rkt b/collects/drracket/private/app.rkt similarity index 100% rename from collects/drscheme/private/app.rkt rename to collects/drracket/private/app.rkt diff --git a/collects/drscheme/private/auto-language.rkt b/collects/drracket/private/auto-language.rkt similarity index 100% rename from collects/drscheme/private/auto-language.rkt rename to collects/drracket/private/auto-language.rkt diff --git a/collects/drscheme/private/bindings-browser.rkt b/collects/drracket/private/bindings-browser.rkt similarity index 100% rename from collects/drscheme/private/bindings-browser.rkt rename to collects/drracket/private/bindings-browser.rkt diff --git a/collects/drscheme/private/bitmap-message.rkt b/collects/drracket/private/bitmap-message.rkt similarity index 100% rename from collects/drscheme/private/bitmap-message.rkt rename to collects/drracket/private/bitmap-message.rkt diff --git a/collects/drscheme/private/debug.rkt b/collects/drracket/private/debug.rkt similarity index 100% rename from collects/drscheme/private/debug.rkt rename to collects/drracket/private/debug.rkt diff --git a/collects/drscheme/private/drscheme-normal.rkt b/collects/drracket/private/drracket-normal.rkt similarity index 95% rename from collects/drscheme/private/drscheme-normal.rkt rename to collects/drracket/private/drracket-normal.rkt index d3e3c3c7dd..e55b3f2d18 100644 --- a/collects/drscheme/private/drscheme-normal.rkt +++ b/collects/drracket/private/drracket-normal.rkt @@ -100,8 +100,8 @@ (cond [(or prince-kuhio-day? kamehameha-day?) (set-splash-progress-bar? #f) - (let ([size ((dynamic-require 'drscheme/private/palaka 'palaka-pattern-size) 4)]) - (vector (dynamic-require 'drscheme/private/honu-logo 'draw-honu) + (let ([size ((dynamic-require 'drracket/private/palaka 'palaka-pattern-size) 4)]) + (vector (dynamic-require 'drracket/private/honu-logo 'draw-honu) size size))] [texas-independence-day? @@ -134,10 +134,10 @@ (label "Break All Threads") (callback (λ (x y) - ((dynamic-require 'drscheme/private/key 'break-threads)))) + ((dynamic-require 'drracket/private/key 'break-threads)))) (parent f))]) (send f show #t))))) -(dynamic-require 'drscheme/tool-lib #f) +(dynamic-require 'drracket/tool-lib #f) (shutdown-splash) (close-splash) diff --git a/collects/drscheme/private/drsig.rkt b/collects/drracket/private/drsig.rkt similarity index 100% rename from collects/drscheme/private/drsig.rkt rename to collects/drracket/private/drsig.rkt diff --git a/collects/drscheme/private/eb.rkt b/collects/drracket/private/eb.rkt similarity index 100% rename from collects/drscheme/private/eb.rkt rename to collects/drracket/private/eb.rkt diff --git a/collects/drscheme/private/embedded-snip-utils.rkt b/collects/drracket/private/embedded-snip-utils.rkt similarity index 100% rename from collects/drscheme/private/embedded-snip-utils.rkt rename to collects/drracket/private/embedded-snip-utils.rkt diff --git a/collects/drscheme/private/eval.rkt b/collects/drracket/private/eval.rkt similarity index 100% rename from collects/drscheme/private/eval.rkt rename to collects/drracket/private/eval.rkt diff --git a/collects/drscheme/private/font.rkt b/collects/drracket/private/font.rkt similarity index 100% rename from collects/drscheme/private/font.rkt rename to collects/drracket/private/font.rkt diff --git a/collects/drscheme/private/frame.rkt b/collects/drracket/private/frame.rkt similarity index 100% rename from collects/drscheme/private/frame.rkt rename to collects/drracket/private/frame.rkt diff --git a/collects/drscheme/private/get-extend.rkt b/collects/drracket/private/get-extend.rkt similarity index 100% rename from collects/drscheme/private/get-extend.rkt rename to collects/drracket/private/get-extend.rkt diff --git a/collects/drscheme/private/help-desk.rkt b/collects/drracket/private/help-desk.rkt similarity index 100% rename from collects/drscheme/private/help-desk.rkt rename to collects/drracket/private/help-desk.rkt diff --git a/collects/drscheme/private/honu-logo.rkt b/collects/drracket/private/honu-logo.rkt similarity index 100% rename from collects/drscheme/private/honu-logo.rkt rename to collects/drracket/private/honu-logo.rkt diff --git a/collects/drscheme/private/init.rkt b/collects/drracket/private/init.rkt similarity index 100% rename from collects/drscheme/private/init.rkt rename to collects/drracket/private/init.rkt diff --git a/collects/drscheme/private/insert-large-letters.rkt b/collects/drracket/private/insert-large-letters.rkt similarity index 100% rename from collects/drscheme/private/insert-large-letters.rkt rename to collects/drracket/private/insert-large-letters.rkt diff --git a/collects/drscheme/private/key.rkt b/collects/drracket/private/key.rkt similarity index 100% rename from collects/drscheme/private/key.rkt rename to collects/drracket/private/key.rkt diff --git a/collects/drscheme/private/label-frame-mred.rkt b/collects/drracket/private/label-frame-mred.rkt similarity index 100% rename from collects/drscheme/private/label-frame-mred.rkt rename to collects/drracket/private/label-frame-mred.rkt diff --git a/collects/drscheme/private/language-configuration.rkt b/collects/drracket/private/language-configuration.rkt similarity index 100% rename from collects/drscheme/private/language-configuration.rkt rename to collects/drracket/private/language-configuration.rkt diff --git a/collects/drscheme/private/language-object-contract.rkt b/collects/drracket/private/language-object-contract.rkt similarity index 98% rename from collects/drscheme/private/language-object-contract.rkt rename to collects/drracket/private/language-object-contract.rkt index 54d9a12677..61d6209fcd 100644 --- a/collects/drscheme/private/language-object-contract.rkt +++ b/collects/drracket/private/language-object-contract.rkt @@ -85,7 +85,7 @@ (define id (reconstitute #,ctc provide?)) #,@(if (syntax-e #'provide?) (list - #`(require/doc drscheme/private/recon) + #`(require/doc drracket/private/recon) #`(provide/doc (thing-doc id contract? diff --git a/collects/drscheme/private/language.rkt b/collects/drracket/private/language.rkt similarity index 99% rename from collects/drscheme/private/language.rkt rename to collects/drracket/private/language.rkt index e18a965980..db3f1b4e0b 100644 --- a/collects/drscheme/private/language.rkt +++ b/collects/drracket/private/language.rkt @@ -279,9 +279,7 @@ [enable-fraction-style (lambda () (let ([on? (member (send output-style get-selection) '(0 1))]) - (send fraction-style enable on?) - (send show-sharing enable on?) - (send insert-newlines enable on?)))] + (send fraction-style enable on?)))] [show-sharing (make-object check-box% (string-constant sharing-printing-label) output-panel @@ -1138,7 +1136,7 @@ ((if gui? make-mred-launcher make-mzscheme-launcher) (list (path->string - (build-path (collection-path "drscheme" "private") + (build-path (collection-path "drracket" "private") (if gui? "launcher-mred-bootstrap.rkt" "launcher-mz-bootstrap.rkt"))) diff --git a/collects/drscheme/private/launcher-bootstrap.rkt b/collects/drracket/private/launcher-bootstrap.rkt similarity index 100% rename from collects/drscheme/private/launcher-bootstrap.rkt rename to collects/drracket/private/launcher-bootstrap.rkt diff --git a/collects/drscheme/private/launcher-mred-bootstrap.rkt b/collects/drracket/private/launcher-mred-bootstrap.rkt similarity index 100% rename from collects/drscheme/private/launcher-mred-bootstrap.rkt rename to collects/drracket/private/launcher-mred-bootstrap.rkt diff --git a/collects/drscheme/private/launcher-mz-bootstrap.rkt b/collects/drracket/private/launcher-mz-bootstrap.rkt similarity index 100% rename from collects/drscheme/private/launcher-mz-bootstrap.rkt rename to collects/drracket/private/launcher-mz-bootstrap.rkt diff --git a/collects/drscheme/private/link.rkt b/collects/drracket/private/link.rkt similarity index 100% rename from collects/drscheme/private/link.rkt rename to collects/drracket/private/link.rkt diff --git a/collects/drscheme/private/main.rkt b/collects/drracket/private/main.rkt similarity index 100% rename from collects/drscheme/private/main.rkt rename to collects/drracket/private/main.rkt diff --git a/collects/drscheme/private/modes.rkt b/collects/drracket/private/modes.rkt similarity index 100% rename from collects/drscheme/private/modes.rkt rename to collects/drracket/private/modes.rkt diff --git a/collects/drscheme/private/module-browser.rkt b/collects/drracket/private/module-browser.rkt similarity index 100% rename from collects/drscheme/private/module-browser.rkt rename to collects/drracket/private/module-browser.rkt diff --git a/collects/drscheme/private/module-language-tools.rkt b/collects/drracket/private/module-language-tools.rkt similarity index 99% rename from collects/drscheme/private/module-language-tools.rkt rename to collects/drracket/private/module-language-tools.rkt index e4df4d84db..ffb035b188 100644 --- a/collects/drscheme/private/module-language-tools.rkt +++ b/collects/drracket/private/module-language-tools.rkt @@ -141,7 +141,7 @@ (if (vector? info-result) 'hash-lang-racket (get-lang-name pos)) - 'drscheme/private/module-language-tools) + 'drracket/private/module-language-tools) ((if (vector? info-result) (vector-ref info-result 0) info-result) diff --git a/collects/drscheme/private/module-language.rkt b/collects/drracket/private/module-language.rkt similarity index 99% rename from collects/drscheme/private/module-language.rkt rename to collects/drracket/private/module-language.rkt index ddc2d646e0..45be88b9af 100644 --- a/collects/drscheme/private/module-language.rkt +++ b/collects/drracket/private/module-language.rkt @@ -212,11 +212,11 @@ (case annotations [(none) (use-compiled-file-paths - (cons (build-path "compiled" "drscheme") + (cons (build-path "compiled" "drracket") (use-compiled-file-paths)))] [(debug) (use-compiled-file-paths - (cons (build-path "compiled" "drscheme" "errortrace") + (cons (build-path "compiled" "drracket" "errortrace") (use-compiled-file-paths)))])) (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) diff --git a/collects/drscheme/private/multi-file-search.rkt b/collects/drracket/private/multi-file-search.rkt similarity index 100% rename from collects/drscheme/private/multi-file-search.rkt rename to collects/drracket/private/multi-file-search.rkt diff --git a/collects/drscheme/private/number-snip.rkt b/collects/drracket/private/number-snip.rkt similarity index 90% rename from collects/drscheme/private/number-snip.rkt rename to collects/drracket/private/number-snip.rkt index c224e5ab3a..22803031e2 100644 --- a/collects/drscheme/private/number-snip.rkt +++ b/collects/drracket/private/number-snip.rkt @@ -5,5 +5,5 @@ (provide snip-class) (define snip-class (make-object number-snip:snip-class%)) - (send snip-class set-classname (format "~s" `(lib "number-snip.ss" "drscheme" "private"))) + (send snip-class set-classname (format "~s" `(lib "number-snip.ss" "drracket" "private"))) (send (get-the-snip-class-list) add snip-class) diff --git a/collects/drscheme/private/palaka.rkt b/collects/drracket/private/palaka.rkt similarity index 100% rename from collects/drscheme/private/palaka.rkt rename to collects/drracket/private/palaka.rkt diff --git a/collects/drscheme/private/profile-drs.rkt b/collects/drracket/private/profile-drs.rkt similarity index 100% rename from collects/drscheme/private/profile-drs.rkt rename to collects/drracket/private/profile-drs.rkt diff --git a/collects/drscheme/private/recon.rkt b/collects/drracket/private/recon.rkt similarity index 100% rename from collects/drscheme/private/recon.rkt rename to collects/drracket/private/recon.rkt diff --git a/collects/drscheme/private/rep.rkt b/collects/drracket/private/rep.rkt similarity index 100% rename from collects/drscheme/private/rep.rkt rename to collects/drracket/private/rep.rkt diff --git a/collects/drscheme/private/stick-figures.rkt b/collects/drracket/private/stick-figures.rkt similarity index 100% rename from collects/drscheme/private/stick-figures.rkt rename to collects/drracket/private/stick-figures.rkt diff --git a/collects/drscheme/private/syncheck-debug.rkt b/collects/drracket/private/syncheck-debug.rkt similarity index 100% rename from collects/drscheme/private/syncheck-debug.rkt rename to collects/drracket/private/syncheck-debug.rkt diff --git a/collects/drscheme/private/text.rkt b/collects/drracket/private/text.rkt similarity index 100% rename from collects/drscheme/private/text.rkt rename to collects/drracket/private/text.rkt diff --git a/collects/drscheme/private/tool-contract-language.rkt b/collects/drracket/private/tool-contract-language.rkt similarity index 100% rename from collects/drscheme/private/tool-contract-language.rkt rename to collects/drracket/private/tool-contract-language.rkt diff --git a/collects/drscheme/private/tools-drs.rkt b/collects/drracket/private/tools-drs.rkt similarity index 97% rename from collects/drscheme/private/tools-drs.rkt rename to collects/drracket/private/tools-drs.rkt index 131ec04260..c8cd193d95 100644 --- a/collects/drscheme/private/tools-drs.rkt +++ b/collects/drracket/private/tools-drs.rkt @@ -42,7 +42,7 @@ This file sets up the right lexical environment to invoke the tools that want to (syntax-case stx () [(_ body tool-name) (let () - (define tool-lib-src (build-path (collection-path "drscheme") "tool-lib.rkt")) + (define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt")) (define full-sexp (call-with-input-file tool-lib-src (λ (port) diff --git a/collects/drscheme/private/tools.rkt b/collects/drracket/private/tools.rkt similarity index 99% rename from collects/drscheme/private/tools.rkt rename to collects/drracket/private/tools.rkt index 4d195a30a8..7c725c66e5 100644 --- a/collects/drscheme/private/tools.rkt +++ b/collects/drracket/private/tools.rkt @@ -323,7 +323,7 @@ string-constants) (syntax-case stx () [(_ body tool-name) (let () - (define tool-lib-src (build-path (collection-path "drscheme") "tool-lib.rkt")) + (define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt")) (define full-sexp (call-with-input-file tool-lib-src diff --git a/collects/drscheme/private/tracing.rkt b/collects/drracket/private/tracing.rkt similarity index 100% rename from collects/drscheme/private/tracing.rkt rename to collects/drracket/private/tracing.rkt diff --git a/collects/drscheme/private/ts.rkt b/collects/drracket/private/ts.rkt similarity index 100% rename from collects/drscheme/private/ts.rkt rename to collects/drracket/private/ts.rkt diff --git a/collects/drscheme/private/unit.rkt b/collects/drracket/private/unit.rkt similarity index 100% rename from collects/drscheme/private/unit.rkt rename to collects/drracket/private/unit.rkt diff --git a/collects/drscheme/sprof.rkt b/collects/drracket/sprof.rkt similarity index 100% rename from collects/drscheme/sprof.rkt rename to collects/drracket/sprof.rkt diff --git a/collects/drscheme/syncheck-drracket-button.rkt b/collects/drracket/syncheck-drracket-button.rkt similarity index 100% rename from collects/drscheme/syncheck-drracket-button.rkt rename to collects/drracket/syncheck-drracket-button.rkt diff --git a/collects/drscheme/syncheck.rkt b/collects/drracket/syncheck.rkt similarity index 99% rename from collects/drscheme/syncheck.rkt rename to collects/drracket/syncheck.rkt index c440d0868a..10ee172ad6 100644 --- a/collects/drscheme/syncheck.rkt +++ b/collects/drracket/syncheck.rkt @@ -23,11 +23,11 @@ If the namespace does not, they are colored the unbound color. scheme/class scheme/list scheme/promise - drscheme/tool + drracket/tool syntax/toplevel syntax/boundmap mrlib/switchable-button - (prefix-in drracket:arrow: drscheme/arrow) + (prefix-in drracket:arrow: drracket/arrow) (prefix-in fw: framework/framework) mred framework diff --git a/collects/drracket/tool-lib.rkt b/collects/drracket/tool-lib.rkt new file mode 100644 index 0000000000..1a9003d50f --- /dev/null +++ b/collects/drracket/tool-lib.rkt @@ -0,0 +1,1585 @@ +#lang at-exp racket/base + +#| + +This first time this is loaded, it loads all of DrRacket and invokes +the main unit, starting up DrRacket. After that, it just provides +all of the names in the tools library, for use defining keybindings + +|# +(require racket/class + racket/gui/base + (except-in scheme/unit struct) + racket/contract + racket/class + + ;; these have to be absolute requires for `include-extracted' to work with this file. + drracket/private/link + drracket/private/drsig + drracket/private/language-object-contract + + framework + framework/splash + + mrlib/switchable-button + scribble/srcdoc) + +(require (for-syntax scheme/base)) + +(require/doc drracket/private/ts ;; probably this also has to be an absolute require + scheme/base scribble/manual) + +(require/doc (for-label errortrace/errortrace-key + scheme/pretty + mzlib/pconvert)) + +(define-values/invoke-unit/infer drracket@) +(provide-signature-elements drracket:tool-cm^) ;; provide all of the classes & interfaces + +(provide drracket:unit:program-editor-mixin) +(define-syntax (drracket:unit:program-editor-mixin stx) + (syntax-case stx () + [(_ a ...) + #'((drracket:unit:get-program-editor-mixin) a ...)] + [_ #'(drracket:unit:get-program-editor-mixin)])) + +(language-object-abstraction drracket:language:object/c #t) + +(provide/doc + + (proc-doc/names + drracket:module-language-tools:add-opt-out-toolbar-button + (-> (-> (is-a?/c top-level-window<%>) + (is-a?/c area-container<%>) + (is-a?/c switchable-button%)) + symbol? + void?) + (make-button id) + @{Call this function to add another button to DrRacket's toolbar. When buttons are added this way, + DrRacket monitors the @tt{#lang} line at the top of the file; when it changes DrRacket queries + the language to see if this button should be included. + These buttons are ``opt out'', meaning that if the language doesn't explicitly ask to not + have this button (or all such buttons), the button will appear. + + See @racket[read-language] for more details on how language's specify how to opt out. + DrRacket will invoke the @tt{get-info} proc from @racket[read-language] with + @indexed-scheme['drscheme:opt-out-toolbar-buttons]. If the result is a list of symbols, the + listed symbols are opted out. If the result is @racket[#f], all buttons are opted + out. The default is the empty list, meaning that all opt-out buttons appear. + }) + + (proc-doc/names + drracket:module-language:add-module-language + (-> any) + () + @{Adds the module language to DrRacket. This is called during DrRacket's startup.}) + + (proc-doc/names + drracket:module-language:module-language-put-file-mixin + (-> (implementation?/c text:basic<%>) (implementation?/c text:basic<%>)) + (super%) + @{Extends @racket[super%] by overriding the @method[editor<%> put-file] method + to use a default name from the buffer, if the buffer contains something like + @tt{(module name ...)}.}) + + + ; + ; + ; + ; ; + ; ; + ; ; + ; ;;; ; ; ;;; ; + ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ;;;;;; ; ; ;;;; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; + ; ;;;; ; ;;;;; ; + ; + ; + ; + + + (proc-doc/names + drracket:eval:set-basic-parameters + (-> (listof (is-a?/c snip-class%)) void?) + (snipclasses) + @{sets the parameters that are shared between the repl's + initialization and @racket[drracket:eval:build-user-eventspace/custodian] + + Specifically, it sets these parameters: + @itemize[ + @item{@racket[current-namespace] has been set to a newly + created empty namespace. This namespace has the following modules + copied (with @racket[namespace-attach-module]) + from DrRacket's original namespace: + @itemize[@item{@racket['mzscheme]}@item{@racket['mred]}] + } + @item{@racket[read-curly-brace-as-paren] + is @racket[#t]; } + @item{@racket[read-square-bracket-as-paren] + is @racket[#t];} + @item{@racket[error-print-width] is set to 250;} + @item{@racket[current-ps-setup] + is set to a newly created + @racket[ps-setup%] + object;} + @item{the @racket[exit-handler] is set to + a parameter that kills the user's custodian; and} + @item{the snip-class-list, returned by + @racket[get-the-snip-class-list] + is initialized with all of the snipclasses in DrRacket's eventspace's snip-class-list.}]}) + + (proc-doc/names + drracket:eval:get-snip-classes + (-> (listof (is-a?/c snip-class%))) + () + @{Returns a list of all of the snipclasses in the current eventspace.}) + + (proc-doc/names + drracket:eval:expand-program + (-> (or/c port? drracket:language:text/pos?) + drracket:language-configuration:language-settings? + boolean? + (-> void?) + (-> void?) + (-> (or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + any) + void?) + (input language-settings eval-compile-time-part? init kill-termination iter) + + @{Use this function to expand the contents of the definitions + window for use with external program processing tools. + + This function uses + @racket[drracket:eval:build-user-eventspace/custodian] + to build the user's environment. + The arguments @racket[language-settings], @racket[init], and + @racket[kill-termination] are passed to + @racket[drracket:eval:build-user-eventspace/custodian]. + + The @racket[input] argument specifies the source of the program. + + The @racket[eval-compile-time-part?] argument indicates if + @racket[expand] + is called or if + @racket[expand-top-level-with-compile-time-evals] + is called when the program is expanded. + Roughly speaking, if your tool will evaluate each expression + itself by calling + @racket[eval] + then pass @racket[#f]. Otherwise, if your tool + just processes the expanded program, be sure to pass + @racket[#t]. + + This function calls + @method[drracket:language:language<%> front-end/complete-program] + to expand the program. Unlike when the @onscreen{Run} is clicked, + however, it does not call + @method[drracket:language:language<%> front-end/finished-complete-program]. + + + The first argument to @racket[iter] is the expanded program + (represented as syntax) or eof. + The @racket[iter] argument is called for each expression in the + expanded program and once more with eof, unless an error is + raised during expansion. + It is called from the user's thread. + If an exception is raised during expansion of the + user's program, @racket[iter] is not called. + Consider setting the exception-handler during @racket[init] to + handle this situation. + + The second argument to @racket[iter] is a thunk that + continues expanding the rest of the contents of the + definitions window. If the first argument to @racket[iter] was + eof, this argument is just the primitive + @racket[void]. + + See also + @racket[drracket:eval:expand-program/multiple].}) + + (proc-doc/names + drracket:eval:traverse-program/multiple + (drracket:language-configuration:language-settings? + (-> void?) + (-> void?) + . -> . + ((or/c port? drracket:language:text/pos?) + ((or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + . -> . + any) + boolean? + . -> . + void?)) + (language-settings init kill-termination) + + @{This function is similar to + @racket[drracket:eval:expand-program/multiple] + The only difference is that it does not + expand the program in the editor; instead + the processing function can decide how to + expand the program.}) + + (proc-doc/names + drracket:eval:expand-program/multiple + (-> drracket:language-configuration:language-settings? + boolean? + (-> void?) + (-> void?) + (-> (or/c port? drracket:language:text/pos?) + (-> (or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + any) + boolean? + void?)) + (language-settings eval-compile-time-part? init kill-termination) + + @{This function is just like + @racket[drracket:eval:expand-program] + except that it is curried and the second application + can be used multiple times. + Use this function if you want to initialize the user's + thread (and namespace, etc) once but have program text + that comes from multiple sources. + + The extra boolean argument to the result function + determines if + @racket[drracket:language:language front-end/complete-program<%>] + or + @racket[drracket:language:language front-end/interaction<%>] + is called.}) + + (proc-doc/names + drracket:eval:build-user-eventspace/custodian + (->* (drracket:language-configuration:language-settings? + (-> void?) + (-> void?)) + () + (values eventspace? custodian?)) + ((language-settings init kill-termination) ()) + + @{This function creates a custodian and an eventspace (on the + new custodian) to expand the user's program. It does not + kill this custodian, but it can safely be shutdown (with + @racket[custodian-shutdown-all]) after the + expansion is finished. + + It initializes the + user's eventspace's main thread with several parameters: + @itemize[ + @item{ @racket[current-custodian] is set to a new custodian. + }@item{ + In addition, it calls + @racket[drracket:eval:set-basic-parameters]. + }] + + The @racket[language-settings] argument is the current + language and its settings. See + @racket[drracket:language-configuration:make-language-settings] + for details on that structure. + + If the program is associated with a DrRacket + frame, get the frame's language settings from the + @method[drracket:unit:definitions-text<%> get-next-settings] + method of + @racket[drracket:unit:definitions-text<%>]. Also, the most recently chosen language in + the language dialog is saved via the framework's + preferences. Apply + @racket[preferences:get] + to + @racket[drracket:language-configuration:get-settings-preferences-symbol] + for that @racket[language-settings]. + + The @racket[init] argument is called after the user's parameters + are all set, but before the program is run. It is called on + the user's thread. The + @racket[current-directory] and + @racket[current-load-relative-directory] + parameters are not set, so if there are appropriate directories, + the @racket[init] argument is a good place to set them. + + The @racket[kill-termination] argument is called when the main thread of + the eventspace terminates, no matter if the custodian was + shutdown, or the thread was killed. This procedure is also + called when the thread terminates normally. This procedure is + called from a new, dedicated thread (@italic{i. e.}, not the thread + created to do the expansion, nor the thread that + @racket[drracket:eval:build-user-eventspace/custodian] was called from.)}) + + + + ; + ; + ; + ; ; ; + ; ; ; + ; ; ; + ; ;; ; ;;; ; ;; ; ; ;; ; + ; ; ;; ; ; ;; ; ; ; ; ;; + ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ;;;;;; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; + ; ; ;; ; ;; ; ; ;; ; ;; + ; ;; ; ;;;; ; ;; ;; ; ;; ; + ; ; + ; ; ; + ; ;;;; + + (proc-doc/names + drracket:debug:error-display-handler/stacktrace + (->* (string? any/c) + ((or/c false/c (listof srcloc?)) + #:definitions-text (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) + #:interactions-text (or/c #f (is-a?/c drracket:rep:text<%>)) + ) + any/c) + ((msg exn) ((stack #f) + (defs #f) + (ints #f))) + @{Displays the error message represented by the string, adding + embellishments like those that appears in the DrRacket REPL, + specifically a clickable icon for the stack trace (if the srcloc location is not empty), + and a clickable icon for the source of the error (read & syntax errors show their source + locations and otherwise the first place in the stack trace is shown). + + If @racket[stack] is false, then the stack traces embedded in the @racket[exn] argument (if any) are used. + Specifically, this function looks for a stacktrace via + @racket[errortrace-key] in the continuation marks of @racket[exn] and @racket[continuation-mark-set->context]. + + If @racket[stack] is not false, that stack is added to the stacks already in the exception. + + This should be called in the same eventspace and on the same thread as the error.}) + + (proc-doc/names + drracket:debug:make-debug-error-display-handler + (-> (-> string? (or/c any/c exn?) any) + (-> string? (or/c any/c exn?) any)) + + (oedh) + + @{This function implements an error-display-handler in terms + of another error-display-handler. + + See also Racket's + @racket[error-display-handler] + parameter. + + If the current-error-port is the definitions window in + DrRacket, this error handler inserts some debugging + annotations, calls @racket[oedh], and then highlights the + source location of the runtime error. + + It looks for both stack trace information in the continuation + marks both via the + @schememodname[errortrace/errortrace-key] + module and via + @racket[continuation-mark-set->context]. + + }) + + (proc-doc/names + drracket:debug:hide-backtrace-window + (-> void?) + () + @{Hides the backtrace window.}) + + (proc-doc/names + drracket:debug:add-prefs-panel + (-> void?) + () + @{Adds the profiling preferences panel.}) + + (proc-doc/names + drracket:debug:open-and-highlight-in-file + (->* ((or/c srcloc? (listof srcloc?))) + ((or/c #f (cons/c (λ (x) (and (weak-box? x) + (let ([v (weak-box-value x)]) + (or (not v) + (is-a?/c v editor<%>))))) + number?))) + void?) + ((debug-info) + ((edition-pair #f))) + @{This function opens a DrRacket to display + @racket[debug-info]. Only the src the position + and the span fields of the srcloc are considered. + + The @racket[edition-pair] is used to determine if a + warning message is shown when before opening the file. + If the @racket[edition-pair] is not @racket[#f], it is compared + with the result of @method[text:basic<%> get-edition-number] + of the editor that is loaded to determine if the file has been + edited since the source location was recorded. If so, it + puts up a warning dialog message to that effect.}) + + (proc-doc/names + drracket:debug:show-backtrace-window/edition-pairs + (-> string? + (listof srcloc?) + (listof (or/c #f (cons/c (λ (x) (and (weak-box? x) + (let ([v (weak-box-value x)]) + (or (not v) + (is-a?/c v editor<%>))))) + number?))) + (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) + (or/c #f (is-a?/c drracket:rep:text<%>)) + void?) + (error-message dis editions-pairs defs ints) + @{Shows the backtrace window you get when clicking on the bug in + DrRacket's REPL. + + The @racket[error-message] argument is the text of the error, + @racket[dis] is the debug information, extracted from the + continuation mark in the exception record, using + @racket[errortrace-key]. + + The @racket[editions] argument indicates the editions of any editors + that are open editing the files corresponding to the source locations + + The @racket[defs] argument should be non-@racket[#f] if there are + possibly stacktrace frames that contain unsaved versions of the + definitions window from DrRacket. Similarly, the @racket[ints] argument + should be non-@racket[#f] if there are possibly stacktrace frames that contain + unsaved versions of the interactions window. + + Use + @racket[drracket:rep:current-rep] to get the rep during evaluation of a program. + + }) + + (proc-doc/names + drracket:debug:show-backtrace-window + (->* (string? + (or/c exn? + (listof srcloc?) + (non-empty-listof (cons/c string? (listof srcloc?))))) + ((or/c #f (is-a?/c drracket:rep:text<%>)) + (or/c #f (is-a?/c drracket:unit:definitions-text<%>))) + void?) + ((error-message dis) + ((rep #f) + (defs #f))) + @{Shows the backtrace window you get when clicking on the bug in + DrRacket's REPL. + + This function simply calls @racket[drracket:debug:show-backtrace-window/edition-pairs], + using @racket[drracket:debug:srcloc->edition/pair]. + }) + + (proc-doc/names + drracket:debug:srcloc->edition/pair + (-> srcloc? + (or/c #f (is-a?/c drracket:rep:text<%>)) + (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) + (or/c #f (cons/c (let ([weak-box-containing-an-editor? + (λ (x) (and (weak-box? x) + (let ([v (weak-box-value x)]) + (or (not v) + (is-a?/c v editor<%>)))))]) + weak-box-containing-an-editor?) + number?))) + (srcloc ints defs) + @{Constructs a edition pair from a source location, + returning the current edition of the editor editing + the source location (if any). + + The @racket[ints] and @racket[defs] arguments are used to map source locations, + in the case that the source location corresponds to the definitions + window (when it has not been saved) or the interactions window. + }) + + + + ; + ; + ; + ; ;; ;; ;;; ;; + ; ;; ;; ;; ;; + ; ;; ;; ;; ;; + ; ;;;;;; ;;;; ;; ;;;;; ;;;;; ;;;; ;;;; ;; ;; + ; ;; ;; ;;; ;; ;; ;; ;; ;; ;;; ;;; ;; ;; ; ;; ; + ; ;; ;; ;;;;;; ;; ;; ;; ;;;;;;; ;; ;;;;;; ;;;; ;;;; + ; ;; ;; ;; ;; ;; ;; ;;;;;;; ;; ;; ;;;; ;;;;; + ; ;; ;; ;;; ; ;; ;; ;; ;; ;; ;;; ; ; ;; ;; ;; + ; ;; ;;; ;;;; ;; ;;;;; ;;;;;; ;;;; ;;;; ;; ;;; + ; ;; + ; ;; + ; ;; + + (proc-doc/names + drracket:help-desk:help-desk + (->* () + ((or/c #f string?) + (or/c #f string? (list/c string? string?))) + any) + (() + ((search-key #f) + (search-context #f))) + @{if @racket[search-key] is a string, calls @racket[perform-search] with + @racket[search-key] and @racket[search-context]. + + Otherwise, calls @racket[send-main-page] with no arguments.}) + + + ; + ; + ; + ; ; + ; + ; ; + ; ; ; ; ;; ; ;;;; + ; ; ; ;; ; ; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ; ;; ; ; ; ; + ; ;; ; ; ; ; ;; + ; + ; + ; + + + (proc-doc/names + drracket:unit:get-program-editor-mixin + (-> ((subclass?/c text%) . -> . (subclass?/c text%))) + () + @{Returns a mixin that must be mixed in to any + @racket[text%] object that might contain + program text (and thus can be in the source + field of some syntax object). + + See also + @racket[drracket:unit:add-to-program-editor-mixin].}) + + (proc-doc/names + drracket:unit:add-to-program-editor-mixin + (((subclass?/c text%) . -> . (subclass?/c text%)) . -> . void?) + (mixin) + @{@phase[1] + + Adds @racket[mixin] to the result of + @racket[drracket:unit:get-program-editor-mixin].}) + + (proc-doc/names + drracket:unit:open-drscheme-window + (case-> + (-> (is-a?/c drracket:unit:frame%)) + ((or/c string? false/c) . -> . (is-a?/c drracket:unit:frame%))) + (() (filename)) + + @{Opens a DrRacket frame that displays + @racket[filename], + or nothing if @racket[filename] is @racket[#f] or not supplied.}) + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;; ;; ;;; ;; ; ;;; ;;; + ; ;; ;; ; ; ; ; ;; ; ; ; + ; ; ; ; ; ; ; ; ; ; ;; + ; ; ; ; ; ; ; ; ;;;;;; ;; + ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ; + ; ; ; ; ;;; ;; ; ;;;; ;;; + ; + ; + ; + + + (proc-doc/names + drracket:modes:add-mode + (string? + (or/c false/c (is-a?/c mode:surrogate-text<%>)) + ((is-a?/c drracket:rep:text%) number? . -> . boolean?) + ((or/c false/c (listof string?)) . -> . boolean?) + . -> . + drracket:modes:mode?) + (name surrogate repl-submit matches-language) + @{Adds a mode to DrRacket. Returns a mode value + that identifies the mode. + + The first argument, @racket[name], is the name + of the mode, used in DrRacket's GUI to allow + the user to select this mode. + + The @racket[surrogate] argument is set to the + definitions text and the interactions text + (via the + @racket[mode:host-text set-surrogate<%>] + method) whenever this mode is enabled. + + The @racket[repl-submit] procedure is called + whenever the user types a return in the interactions + window. It is passed the interactions editor + and the position where the last prompt occurs. + If it + returns @racket[#t], the text after the last + prompt is treated as a program fragment and + evaluated, according to the language settings. + If it returns @racket[#f], the text is + assumed to be an incomplete program fragment, and + the keystroke is not treated specially. + + The @racket[matches-language] predicate is called whenever + the language changes. If it returns @racket[#t] + this mode is installed. It is passed the list of strings + that correspond to the names of the language in the + language dialog. + + Modes are tested in the opposite order that they are + added. That is, the last mode to be added gets tested + first when the filename changes or when the language + changes. + + See also + @racket[drracket:modes:get-modes].}) + + (proc-doc/names + drracket:modes:mode? + (any/c . -> . boolean?) + (val) + @{Determines if @racket[val] is a mode.}) + + (proc-doc/names + drracket:modes:get-modes + (-> (listof drracket:modes:mode?)) + () + @{Returns all of the modes currently added to DrRacket. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-name + (drracket:modes:mode? . -> . string?) + (mode) + @{Extracts the name of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-surrogate + (drracket:modes:mode? . -> . (or/c false/c (is-a?/c mode:surrogate-text<%>))) + (mode) + @{Extracts the surrogate of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-repl-submit + (drracket:modes:mode? . -> . any) + (mode) + @{Extracts the repl submission predicate of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-matches-language + (drracket:modes:mode? . -> . ((or/c false/c (listof string?)) . -> . boolean?)) + (mode) + @{Extracts the language matching predicate of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + + ; + ; + ; + ; + ; + ; + ; ; ; ;;; ; ;; + ; ;; ; ; ;; ; + ; ; ; ; ; ; + ; ; ;;;;;; ; ; + ; ; ; ; ; + ; ; ; ;; ; + ; ; ;;;; ; ;; + ; ; + ; ; + ; ; + + + (proc-doc/names + drracket:rep:get-welcome-delta + (-> (is-a?/c style-delta%)) + () + @{Returns a style delta that matches the style and color of the + phrase ``Welcome to'' in the beginning of the interactions window.}) + + (proc-doc/names + drracket:rep:get-dark-green-delta + (-> (is-a?/c style-delta%)) + () + @{Returns a style delta that matches the style and color of the + name of a language in the interactions window.}) + + (proc-doc/names + drracket:rep:get-drs-bindings-keymap + (-> (is-a?/c keymap%)) + () + @{Returns a keymap that binds various DrRacket-specific + keybindings. This keymap is used in the definitions + and interactions window. + + Defaultly binds C-x;o to a function that switches + the focus between the definitions and interactions + windows. Also binds f5 to Execute and f1 to Help Desk.}) + + (proc-doc/names + drracket:rep:current-rep + (-> (or/c false/c (is-a?/c drracket:rep:text%))) + () + + @{This is a parameter whose value should not be set by tools. + It is initialized to the repl that controls this evaluation + in the user's thread. + + It only returns @racket[#f] if the program not running + in the context of a repl (eg, the test suite window).}) + + (proc-doc/names + drracket:rep:current-value-port + (-> (or/c false/c port?)) + () + @{This is a parameter whose value is a port that + prints in the REPL in blue. It is used to print + the values of toplevel expressions in the REPL. + + It is only initialized on the user's thread.}) + + + ; + ; + ; + ; ; ; + ; ; ; + ; ; ; ; ; + ; ;; ; ;;; ;;;; ; ;;; ; ; ;;;; ;;; ; ;; ;; ; + ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; ; ; ;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ;;;;;; ; ; ;;;;;; ; ; ;;;;;; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; + ; ;; ; ;;;; ;; ; ;;;; ; ; ;; ;;;; ; ; ;; ; + ; ; ; + ; ; ; ; + ; ;;;; + + + (proc-doc/names + drracket:get/extend:extend-tab + (case-> + ((make-mixin-contract drracket:unit:tab<%>) . -> . void?) + ((make-mixin-contract drracket:unit:tab<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This class implements the tabs in DrRacket. One is created for each tab + in a frame (each frame always has at least one tab, even if the tab bar is not shown) + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#t].}) + + (proc-doc/names + drracket:get/extend:extend-interactions-text + (case-> + ((make-mixin-contract drracket:rep:text<%>) . -> . void?) + ((make-mixin-contract drracket:rep:text<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This text is used in the bottom window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#t].}) + + (proc-doc/names + drracket:get/extend:get-interactions-text + (-> (implementation?/c drracket:rep:text<%>)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-interactions-text] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-definitions-text + (case-> + ((make-mixin-contract drracket:unit:definitions-text<%>) . -> . void?) + ((make-mixin-contract drracket:unit:definitions-text<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This text is used in the top window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-definitions-text + (-> (implementation?/c drracket:unit:definitions-text<%>)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-definitions-text] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-interactions-canvas + (case-> + ((make-mixin-contract drracket:unit:interactions-canvas%) . -> . void?) + ((make-mixin-contract drracket:unit:interactions-canvas%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This canvas is used in the bottom window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-interactions-canvas + (-> (subclass?/c drracket:unit:interactions-canvas%)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-interactions-canvas] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-definitions-canvas + (case-> + ((make-mixin-contract drracket:unit:definitions-canvas%) . -> . void?) + ((make-mixin-contract drracket:unit:definitions-canvas%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This canvas is used in the top window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-definitions-canvas + (-> (subclass?/c drracket:unit:definitions-canvas%)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-definitions-canvas] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-unit-frame + (case-> + ((make-mixin-contract drracket:unit:frame%) . -> . void?) + ((make-mixin-contract drracket:unit:frame%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This is the frame that implements the main DrRacket window. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-unit-frame + (-> (subclass?/c drracket:unit:frame%)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-unit-frame] + raises an error, disallowing any more extensions.}) + + + + ; + ; + ; + ; + ; ; ;;; + ; ;;; + ; ;;;; ;;; ;;;;;;; ;;; ;;; ;;; ;; ;; ;;; + ; ;;;; ;;;;;;;;;;;; ;;;;; ;;; ;;;;;;; ;;;;;;; + ; ;;; ;;; ;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; + ; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;; ;;; ;;; + ; ;;; ;;; ;;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; + ; ;;;; ;;; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;;;;;; + ; ;;; ;;; ;;;;;; ;;; ;;; ;;; ;;; ;; ;;; + ; ;;; + ; ;;;;;; + ; + ; + + (proc-doc/names + drracket:tracing:annotate + (-> syntax? syntax?) + (stx) + @{Call this function to add tracing annotations to the a fully-expanded + expression. When the program runs, DrRacket will pop open the tracing + window to display the trace.}) + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; + ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; + ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; + ; ; ; + ; ; ; ; ; + ; ;;;; ;;;; + ; + ; + ; + ; ;;; ; ; + ; ; + ; ; ; + ; ;;; ;;; ; ;; ;;;; ; ;; ; ; ; ; ; ;;; ;;;; ; ;;; ; ;; + ; ; ; ; ; ;; ; ; ; ; ;; ; ; ;; ; ; ; ; ; ; ;; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ;;;; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ;; ; ;; ; ; ; ; ; ; ; ; ; + ; ;;; ;;; ; ; ; ; ;; ; ;; ; ; ;;;;; ;; ; ;;; ; ; + ; ; + ; ; ; + ; ;;;; + + (proc-doc/names + drracket:language-configuration:get-languages + (-> (listof (is-a?/c drracket:language:language<%>))) + () + @{This can only be called after all of the tools initialization phases have completed. + + Returns the list of all of the languages installed in DrRacket.}) + + (proc-doc/names + drracket:language-configuration:add-language + ((and/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) + . -> . void?) + (language) + + @{@phase[2] + + Adds @racket[language] to the languages offerend by DrRacket.}) + + (proc-doc/names + drracket:language-configuration:get-settings-preferences-symbol + (-> symbol?) + () + @{Returns the symbol that is used to store the user's language + settings. Use as an argument to either + @racket[preferences:get] + or + @racket[preferences:set].}) + + (proc-doc/names + drracket:language-configuration:make-language-settings + ((or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) + any/c + . -> . + drracket:language-configuration:language-settings?) + (language settings) + + @{This is the constructor for a record consisting of two + elements, a language and its settings. + + The settings is a language-specific record that holds a + value describing a parameterization of the language. + + It has two selectors, + @racket[drracket:language-configuration:language-settings-language] + and + @racket[drracket:language-configuration:language-settings-settings], and a predicate, + @racket[drracket:language-configuration:language-settings?]}) + + (proc-doc/names + drracket:language-configuration:language-settings-settings + (-> drracket:language-configuration:language-settings? + any/c) + (ls) + @{Extracts the settings field of a language-settings.}) + + (proc-doc/names + drracket:language-configuration:language-settings-language + (drracket:language-configuration:language-settings? + . -> . + (or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c)) + (ls) + + @{Extracts the language field of a language-settings.}) + + (proc-doc/names + drracket:language-configuration:language-settings? + (any/c . -> . boolean?) + (val) + + @{Determines if the argument is a language-settings or not.}) + + (proc-doc/names + drracket:language-configuration:language-dialog + (->* (boolean? drracket:language-configuration:language-settings?) + ((or/c false/c (is-a?/c top-level-window<%>))) + (or/c false/c drracket:language-configuration:language-settings?)) + ((show-welcome? language-settings-to-show) + ((parent #t))) + @{Opens the language configuration dialog. + See also + @racket[drracket:language-configuration:fill-language-dialog]. + + The @racket[show-welcome?] argument determines if + if a ``Welcome to DrRacket'' message and some + natural language buttons are shown. + + The @racket[language-settings-to-show] argument + must be some default language settings that the dialog + is initialized to. + If unsure of a default, the currently set language + in the user's preferences can be obtained via: + @schemeblock[ + (preferences:get (drracket:language-configuration:get-settings-preferences-symbol)) + ] + + The @racket[parent] argument is used as the parent + to the dialog. + + The result if @racket[#f] when the user cancells the dialog, and + the selected language if they hit ok.}) + + (proc-doc/names + drracket:language-configuration:fill-language-dialog + (->* + ((is-a?/c vertical-panel%) + (is-a?/c area-container<%>) + drracket:language-configuration:language-settings?) + ((or/c false/c (is-a?/c top-level-window<%>)) + (-> symbol? void?)) + drracket:language-configuration:language-settings?) + ((panel button-panel language-setting) + ((re-center #f) + (ok-handler void))) + @{This procedure accepts two parent panels and + fills them with the contents of the language dialog. + It is used to include language configuration controls + in some larger context in another dialog. + + The @racket[panel] argument is the main panel where the + language controls will be placed. + The function adds buttons to the @racket[button-panel] + to revert a language to its default settings and to + show the details of a language. + + The @racket[language-setting] is the default + language to show in the dialog. + + The @racket[re-center] argument is used when the @onscreen{Show Details} + button is clicked. If that argument is a @racket[top-level-window<%>], + the @onscreen{Show Details} callback will recenter the window each time + it is clicked. Otherwise, the argument is not used. + + @racket[ok-handler] is a function that is in charge of interfacing the OK + button. It should accept a symbol message: @racket['enable] and + @racket['disable] to toggle the button, and @racket['execute] to run + the desired operation. (The language selection dialog also uses an + internal @racket['enable-sync] message.)}) + + (proc-doc + drracket:language:register-capability + (->d ([s symbol?] + [the-contract contract?] + [default the-contract]) + () + [res void?]) + @{Registers a new capability with a default value for each language + and a contract on the values the capability might have. + + By default, these capabilities are registered as DrRacket starts up: + @(let-syntax ([cap (syntax-rules () + [(cap key contract default desc ...) + (item @racket['key : contract = default] + "--- " desc ...)])]) + (itemize + @cap[drracket:check-syntax-button boolean? #t]{controls the visiblity of the check syntax button} + @cap[drracket:language-menu-title + string? + (string-constant scheme-menu-name)]{ + controls the name of the menu just to the right of the language + menu (defaultly named ``Racket'')} + @cap[drscheme:define-popup + (or/c #f + (list/c string? string? string?) + (cons/c string? string?)) + (list "(define" "(define ...)" "δ")]{ + specifies the prefix that the define popup should look for and what + label it should have, or @racket[#f] if it should not appear at all. + + If the list of three strings alternative is used, the first string is + the prefix that is looked for when finding definitions. The second + and third strings are used as the label of the control, in horizontal + and vertical mode, respectively. + + The pair of strings alternative is deprecated. If it is used, + the pair @racket[(cons a-str b-str)] is the same as @racket[(list a-str b-str "δ")].} + @cap[drscheme:help-context-term (or/c false/c string?) #f]{ + specifies a context query for documentation searches that are + initiated in this language, can be @racket[#f] (no change to the + user's setting) or a string to be used as a context query (note: the + context is later maintained as a cookie, @racket[""] is different + from @racket[#f] in that it clears the stored context)} + @cap[drscheme:special:insert-fraction boolean? #t]{ + determines if the insert fraction menu item in the special menu is + visible} + @cap[drscheme:special:insert-lambda boolean? #t]{ + determines if the insert lambda menu item in the special menu is + visible} + @cap[drscheme:special:insert-large-letters boolean? #t]{ + determines if the insert large letters menu item in the special menu + is visible} + @cap[drscheme:special:insert-image boolean? #t]{ + determines if the insert image menu item in the special menu is + visible} + @cap[drscheme:special:insert-comment-box boolean? #t]{ + determines if the insert comment box menu item in the special menu + is visible} + @cap[drscheme:special:insert-gui-tool boolean? #t]{ + determines if the insert gui menu item in the special menu is + visible} + @cap[drscheme:special:slideshow-menu-item boolean? #t]{ + determines if the insert pict box menu item in the special menu is + visible} + @cap[drscheme:special:insert-text-box boolean? #t]{ + determines if the insert text box menu item in the special menu is + visible} + @cap[drscheme:special:xml-menus boolean? #t]{ + determines if the insert scheme box, insert scheme splice box, and + the insert xml box menu item in the special menu are visible} + @cap[drscheme:autocomplete-words (listof string?) '()]{ + determines the list of words that are used when completing words in + this language} + @cap[drscheme:tabify-menu-callback + (or/c false/c (-> (is-a?/c text%) number? number? void?)) + (λ (t a b) (send t tabify-selection a b))]{ + is used as the callback when the ``Reindent'' or ``Reindent All'' + menu is selected. The first argument is the editor, and the second + and third are a range in the editor.} + ))}) + + (proc-doc/names + drracket:language:capability-registered? + (-> symbol? boolean?) + (s) + @{Indicates if + @racket[drracket:language:register-capability] + has been called with @racket[s].}) + (proc-doc + drracket:language:get-capability-default + (->d ([s (and/c symbol? drracket:language:capability-registered?)]) + () + [res (drracket:language:get-capability-contract s)]) + @{Returns the default for a particular capability.}) + (proc-doc/names + drracket:language:get-capability-contract + (-> (and/c symbol? drracket:language:capability-registered?) + contract?) + (s) + @{Returns the contract for a given capability, which was specified + when @racket[drracket:language:register-capability] was called.}) + + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; + ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; + ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; + ; ; ; + ; ; ; ; ; + ; ;;;; ;;;; + + + (proc-doc/names + drracket:language:add-snip-value + (->* ((-> any/c boolean?) + (-> any/c (is-a?/c snip%))) + ((-> any/c)) + void?) + ((test-value convert-value) + ((setup-thunk void))) + @{Registers a handler to convert values into snips as they are printed in the REPL. + + The @racket[test-snip] argument is called to determine if this handler can convert the value + and the @racket[convert-value] argument is called to build a snip. + The (optional) @racket[setup-thunk] is called just after the user's namespace and other + setings are built, but before any of the user's code is evaluated. + + All three functions are called on the user's thread and with the user's settings.}) + + (proc-doc/names + drracket:language:extend-language-interface + (-> interface? + (make-mixin-contract drracket:language:language<%>) + void?) + (interface default-implementation) + + @{@phase[1] + + Each language added passed to + @racket[drracket:language-configuration:add-language] + must implement @racket[interface]. + + The @racket[default-implementation] is a mixin + that provides a default implementation of + @racket[interface]. Languages that are unaware of + the specifics of @racket[extension] use + @racket[default-implementation] via + @racket[drracket:language:get-default-mixin].}) + + (proc-doc + drracket:language:get-default-mixin + (-> (make-mixin-contract drracket:language:language<%>)) + + @{@phase[2] + + The result of this function is the composite of all of the + @racket[default-implementation] arguments passed + to + @racket[drracket:language:extend-language-interface].}) + + (proc-doc/names + drracket:language:get-language-extensions + (-> (listof interface?)) + () + @{@phase[2] + + Returns a list of the interfaces passed to + @racket[drracket:language:extend-language-interface].}) + + (proc-doc/names + drracket:language:put-executable + ((is-a?/c top-level-window<%>) + path? + (or/c boolean? (symbols 'launcher 'standalone 'distribution)) + boolean? + string? + . -> . (or/c false/c path?)) + (parent program-filename mode mred? title) + @{Calls the MrEd primitive + @racket[put-file] + with arguments appropriate for creating an executable + from the file @racket[program-filename]. + + The arguments @racket[mred?] and @racket[mode] indicates + what type of executable this should be (and the dialog + may be slightly different on some platforms, depending + on these arguments). For historical reasons, @racket[#f] + is allowed for @racket[mode] as an alias for @racket['launcher], and + @racket[#t] is allowed for @racket[mode] as an alias for @racket['stand-alone]. + + The @racket[title] argument is used as the title to the primitive + @racket[put-file] + or + @racket[get-directory] + primitive.}) + + (proc-doc/names + drracket:language:create-executable-gui + ((or/c false/c (is-a?/c top-level-window<%>)) + (or/c false/c string?) + (or/c (λ (x) (eq? x #t)) (symbols 'launcher 'standalone 'distribution)) + (or/c (λ (x) (eq? x #t)) (symbols 'mzscheme 'mred)) + . -> . + (or/c false/c + (list/c (symbols 'no-show 'launcher 'stand-alone 'distribution) + (symbols 'no-show 'mred 'mzscheme) + string?))) + (parent program-name show-type show-base) + @{Opens a dialog to prompt the user about their choice of executable. + If @racket[show-type] is @racket[#t], the user is prompted about + a choice of executable: stand-alone, + launcher, or distribution; otherwise, the symbol determines the type. + If @racket[show-base] + is @racket[#t], the user is prompted about a choice of base + binary: mzscheme or mred; otherwise the symbol determines the base. + + The @racket[program-name] argument is used to construct the default + executable name in a platform-specific manner. + + The @racket[parent] argument is used for the parent of the dialog. + + The result of this function is @racket[#f] if the user cancel's + the dialog and a list of three items indicating what options + they chose. If either @racket[show-type] or @racket[show-base] + was not @racket[#t], the corresponding result will be @racket['no-show], + otherwise it will indicate the user's choice.}) + + (proc-doc/names + drracket:language:create-module-based-stand-alone-executable + ((or/c path? string?) + (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + executable-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{This procedure creates a stand-alone executable in the file + @racket[executable-filename] that runs the program + @racket[program-filename]. + + The arguments + @racket[module-language-spec] and + @racket[transformer-module-language-spec] specify the + settings of the initial namespace, both the transformer + portion and the regular portion. Both may be @racket[#f] + to indicate there are no initial bindings. + + The @racket[init-code] argument is an s-expression representing + the code for a module. This module is expected to provide + the identifer @racket[init-code], bound to a procedure of no + arguments. That module is required and the @racket[init-code] + procedure is executed to initialize language-specific + settings before the code in @racket[program-filename] runs. + + The @racket[gui?] argument indicates if a GRacket or Racket + stand-alone executable is created. + + The @racket[use-copy?] argument indicates if the initial + namespace should be populated with + @racket[namespace-require/copy] or + @racket[namespace-require]. }) + + (proc-doc/names + drracket:language:create-module-based-distribution + ((or/c path? string?) + (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + distribution-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{Like + @racket[drracket:language:create-module-based-stand-alone-executable], but packages the stand-alone executable into a distribution.}) + + (proc-doc/names + drracket:language:create-distribution-for-executable + ((or/c path? string?) + boolean? + (-> path? void?) + . -> . + void?) + (distribution-filename + gui? + make-executable) + + @{Creates a distribution where the given @racket[make-executable] procedure + creates the stand-alone executable to be distributed. + The @racket[make-executable] procedure is given the name of the + executable to create. The @racket[gui?] argument is needed in case the + executable's name (which @racket[drracket:language:create-distribution-for-executable] + must generate) depends on the type of executable. During the distribution-making + process, a progress dialog is shown to the user, and the user can click an + @onscreen{Abort} button that sends a break to the current thread.}) + + (proc-doc/names + drracket:language:create-module-based-launcher + ((or/c path? string?) (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + executable-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{This procedure is identical to + @racket[drracket:language:create-module-based-stand-alone-executable], except that it creates a launcher instead of a + stand-alone executable.}) + + (proc-doc/names + drracket:language:simple-module-based-language-convert-value + (-> any/c drracket:language:simple-settings? any) + (value settings) + @{The result can be either one or two values. The first result is + the converted value. The second result is @racket[#t] if the converted + value should be printed with @racket[write] (or @racket[pretty-write]), + @racket[#f] if the converted result should be printed with + @racket[print] (or @racket[pretty-print]); the default second + result is @racket[#t]. + + The default implementation of this method depends on the + @racket[simple-settings-printing-style] field of @racket[settings]. + If it is @racket['print], the + result is @racket[(values value #f)]. If it is @racket['write] or @racket['trad-write], + the result is just @racket[value]. Otherwise, the result is produce by + adjusting the @racket[constructor-style-printing] and @racket[show-sharing] + parameters based on @racket[settings], setting @racket[current-print-convert-hook] + to ignore snips, and then applying @racket[print-convert] to @racket[value].}) + + (proc-doc/names + drracket:language:setup-printing-parameters + (-> (-> any) drracket:language:simple-settings? (or/c number? 'infinity) any) + (thunk settings width) + @{Sets all of the @racket[pretty-print] and @racket[print-convert] parameters + either to the defaults to values based on @racket[settings] + and then invokes @racket[thunk], returning what it returns.}) + + (proc-doc/names + drracket:language:text/pos-text + (drracket:language:text/pos? . -> . (is-a?/c text%)) + (text/pos) + + @{Selects the @racket[text%] from a text/pos.}) + + (proc-doc/names + drracket:language:text/pos-start + (drracket:language:text/pos? . -> . number?) + (text/pos) + + @{Selects the starting position from a text/pos.}) + + (proc-doc/names + drracket:language:text/pos-end + (drracket:language:text/pos? . -> . number?) + (text/pos) + + @{Selects the ending position from a text/pos.}) + + (proc-doc/names + drracket:language:text/pos? + (any/c . -> . boolean?) + (val) + + @{Returns @racket[#t] if @racket[val] is a text/pos, and @racket[#f] + otherwise.}) + + (proc-doc/names + drracket:language:make-text/pos + ((is-a?/c text%) number? number? + . -> . + drracket:language:text/pos?) + (text start end) + + @{Constructs a text/pos.}) + + (proc-doc/names + drracket:language:simple-settings-case-sensitive + (drracket:language:simple-settings? . -> . boolean?) + (simple-settings) + + @{Extracts the case-sensitive setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-printing-style + (drracket:language:simple-settings? + . -> . + (symbols 'constructor 'quasiquote 'write 'print)) + (simple-settings) + + @{Extracts the printing-style setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-fraction-style + (drracket:language:simple-settings? + . -> . + (symbols 'mixed-fraction + 'mixed-fraction-e + 'repeating-decimal + 'repeating-decimal-e)) + (simple-settings) + + @{Extracts the fraction-style setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-show-sharing + (drracket:language:simple-settings? + . -> . + boolean?) + (simple-settings) + + @{Extracts the show-sharing setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-insert-newlines + (drracket:language:simple-settings? + . -> . + boolean?) + (simple-settings) + + @{Extracts the insert-newline setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-annotations + (drracket:language:simple-settings? + . -> . + (symbols 'none 'debug 'debug/profile 'test-coverage)) + (simple-settings) + + @{Extracts the debugging setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings? + (any/c . -> . boolean?) + (val) + + @{Determines if @racket[val] is a simple-settings.}) + + (proc-doc/names + drracket:language:make-simple-settings + (-> boolean? + (symbols 'constructor 'quasiquote 'write 'trad-write 'print) + (symbols 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e) + boolean? + boolean? + (symbols 'none 'debug 'debug/profile 'test-coverage) + drracket:language:simple-settings?) + (case-sensitive + printing-style + fraction-style + show-sharing + insert-newlines + annotations) + + @{Constructs a simple settings.}) + + (proc-doc/names + drracket:language:simple-settings->vector + (drracket:language:simple-settings? . -> . vector?) + (simple-settings) + + @{Constructs a vector whose elements are the fields of @racket[simple-settings].})) diff --git a/collects/drracket/tool.rkt b/collects/drracket/tool.rkt new file mode 100644 index 0000000000..9d0842fc64 --- /dev/null +++ b/collects/drracket/tool.rkt @@ -0,0 +1,6 @@ +#lang racket/base +(require "private/drsig.ss") +(provide drracket:tool^ + drracket:tool-exports^ + drscheme:tool^ + (rename-out [drracket:tool-exports^ drscheme:tool-exports^])) diff --git a/collects/drscheme/drscheme.rkt b/collects/drscheme/drscheme.rkt index b5c00befe4..ed77a6e4e7 100644 --- a/collects/drscheme/drscheme.rkt +++ b/collects/drscheme/drscheme.rkt @@ -1,67 +1,2 @@ #lang racket/base -(require scheme/gui/base "private/key.rkt") - -(define debugging? (getenv "PLTDRDEBUG")) -(define profiling? (getenv "PLTDRPROFILE")) - -(define install-cm? (and (not debugging?) - (getenv "PLTDRCM"))) - -(define cm-trace? (or (equal? (getenv "PLTDRCM") "trace") - (equal? (getenv "PLTDRDEBUG") "trace"))) - - -;; the flush is only here to ensure that the output is -;; appears when running in cygwin under windows. -(define (flprintf fmt . args) - (apply printf fmt args) - (flush-output)) - -(when debugging? - (flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n") - (let-values ([(zo-compile - make-compilation-manager-load/use-compiled-handler - manager-trace-handler) - (parameterize ([current-namespace (make-base-empty-namespace)] - [use-compiled-file-paths '()]) - (values - (dynamic-require 'errortrace/zo-compile 'zo-compile) - (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) - (dynamic-require 'compiler/cm 'manager-trace-handler)))]) - (current-compile zo-compile) - (use-compiled-file-paths (list (build-path "compiled" "errortrace"))) - (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) - (error-display-handler (dynamic-require 'errortrace/errortrace-lib - 'errortrace-error-display-handler)) - (when cm-trace? - (flprintf "PLTDRDEBUG: enabling CM tracing\n") - (manager-trace-handler - (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) - -(when install-cm? - (flprintf "PLTDRCM: installing compilation manager\n") - (let-values ([(make-compilation-manager-load/use-compiled-handler - manager-trace-handler) - (parameterize ([current-namespace (make-base-empty-namespace)]) - (values - (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) - (dynamic-require 'compiler/cm 'manager-trace-handler)))]) - (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) - (when cm-trace? - (flprintf "PLTDRCM: enabling CM tracing\n") - (manager-trace-handler - (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) - -(when profiling? - (flprintf "PLTDRPROFILE: installing profiler\n") - ;; NOTE that this might not always work. - ;; it creates a new custodian and installs it, but the - ;; original eventspace was created on the original custodian - ;; and this code does not create a new eventspace. - (let ([orig-cust (current-custodian)] - [orig-eventspace (current-eventspace)] - [new-cust (make-custodian)]) - (current-custodian new-cust) - ((dynamic-require 'drscheme/private/profile-drs 'start-profile) orig-cust))) - -(dynamic-require 'drscheme/private/drscheme-normal #f) +(require drracket/drracket) diff --git a/collects/drscheme/info.rkt b/collects/drscheme/info.rkt index 4a7185bb45..2442c15e2c 100644 --- a/collects/drscheme/info.rkt +++ b/collects/drscheme/info.rkt @@ -1,13 +1,4 @@ #lang setup/infotab -;(define tools '("sprof.rkt")) -;(define tool-names '("Sampling Profiler")) - -(define drracket-tools '("syncheck.rkt")) -(define drracket-tool-names '("Check Syntax")) - -(define gracket-launcher-names '("DrRacket")) -(define gracket-launcher-libraries '("drscheme.rkt")) - (define mred-launcher-names '("DrScheme")) (define mred-launcher-libraries '("drscheme.rkt")) diff --git a/collects/drscheme/tool-lib.rkt b/collects/drscheme/tool-lib.rkt index df3c9a132f..4b4a1c3cfe 100644 --- a/collects/drscheme/tool-lib.rkt +++ b/collects/drscheme/tool-lib.rkt @@ -1,1585 +1,3 @@ -#lang at-exp racket/base - -#| - -This first time this is loaded, it loads all of DrRacket and invokes -the main unit, starting up DrRacket. After that, it just provides -all of the names in the tools library, for use defining keybindings - -|# -(require racket/class - racket/gui/base - (except-in scheme/unit struct) - racket/contract - racket/class - - ;; these have to be absolute requires for `include-extracted' to work with this file. - drscheme/private/link - drscheme/private/drsig - drscheme/private/language-object-contract - - framework - framework/splash - - mrlib/switchable-button - scribble/srcdoc) - -(require (for-syntax scheme/base)) - -(require/doc drscheme/private/ts ;; probably this also has to be an absolute require - scheme/base scribble/manual) - -(require/doc (for-label errortrace/errortrace-key - scheme/pretty - mzlib/pconvert)) - -(define-values/invoke-unit/infer drracket@) -(provide-signature-elements drracket:tool-cm^) ;; provide all of the classes & interfaces - -(provide drracket:unit:program-editor-mixin) -(define-syntax (drracket:unit:program-editor-mixin stx) - (syntax-case stx () - [(_ a ...) - #'((drracket:unit:get-program-editor-mixin) a ...)] - [_ #'(drracket:unit:get-program-editor-mixin)])) - -(language-object-abstraction drracket:language:object/c #t) - -(provide/doc - - (proc-doc/names - drracket:module-language-tools:add-opt-out-toolbar-button - (-> (-> (is-a?/c top-level-window<%>) - (is-a?/c area-container<%>) - (is-a?/c switchable-button%)) - symbol? - void?) - (make-button id) - @{Call this function to add another button to DrRacket's toolbar. When buttons are added this way, - DrRacket monitors the @tt{#lang} line at the top of the file; when it changes DrRacket queries - the language to see if this button should be included. - These buttons are ``opt out'', meaning that if the language doesn't explicitly ask to not - have this button (or all such buttons), the button will appear. - - See @racket[read-language] for more details on how language's specify how to opt out. - DrRacket will invoke the @tt{get-info} proc from @racket[read-language] with - @indexed-scheme['drscheme:opt-out-toolbar-buttons]. If the result is a list of symbols, the - listed symbols are opted out. If the result is @racket[#f], all buttons are opted - out. The default is the empty list, meaning that all opt-out buttons appear. - }) - - (proc-doc/names - drracket:module-language:add-module-language - (-> any) - () - @{Adds the module language to DrRacket. This is called during DrRacket's startup.}) - - (proc-doc/names - drracket:module-language:module-language-put-file-mixin - (-> (implementation?/c text:basic<%>) (implementation?/c text:basic<%>)) - (super%) - @{Extends @racket[super%] by overriding the @method[editor<%> put-file] method - to use a default name from the buffer, if the buffer contains something like - @tt{(module name ...)}.}) - - - ; - ; - ; - ; ; - ; ; - ; ; - ; ;;; ; ; ;;; ; - ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; - ; ;;;;;; ; ; ;;;; ; - ; ; ; ; ; ; ; - ; ; ; ; ; ; - ; ;;;; ; ;;;;; ; - ; - ; - ; - - - (proc-doc/names - drracket:eval:set-basic-parameters - (-> (listof (is-a?/c snip-class%)) void?) - (snipclasses) - @{sets the parameters that are shared between the repl's - initialization and @racket[drracket:eval:build-user-eventspace/custodian] - - Specifically, it sets these parameters: - @itemize[ - @item{@racket[current-namespace] has been set to a newly - created empty namespace. This namespace has the following modules - copied (with @racket[namespace-attach-module]) - from DrRacket's original namespace: - @itemize[@item{@racket['mzscheme]}@item{@racket['mred]}] - } - @item{@racket[read-curly-brace-as-paren] - is @racket[#t]; } - @item{@racket[read-square-bracket-as-paren] - is @racket[#t];} - @item{@racket[error-print-width] is set to 250;} - @item{@racket[current-ps-setup] - is set to a newly created - @racket[ps-setup%] - object;} - @item{the @racket[exit-handler] is set to - a parameter that kills the user's custodian; and} - @item{the snip-class-list, returned by - @racket[get-the-snip-class-list] - is initialized with all of the snipclasses in DrRacket's eventspace's snip-class-list.}]}) - - (proc-doc/names - drracket:eval:get-snip-classes - (-> (listof (is-a?/c snip-class%))) - () - @{Returns a list of all of the snipclasses in the current eventspace.}) - - (proc-doc/names - drracket:eval:expand-program - (-> (or/c port? drracket:language:text/pos?) - drracket:language-configuration:language-settings? - boolean? - (-> void?) - (-> void?) - (-> (or/c eof-object? syntax? (cons/c string? any/c)) - (-> any) - any) - void?) - (input language-settings eval-compile-time-part? init kill-termination iter) - - @{Use this function to expand the contents of the definitions - window for use with external program processing tools. - - This function uses - @racket[drracket:eval:build-user-eventspace/custodian] - to build the user's environment. - The arguments @racket[language-settings], @racket[init], and - @racket[kill-termination] are passed to - @racket[drracket:eval:build-user-eventspace/custodian]. - - The @racket[input] argument specifies the source of the program. - - The @racket[eval-compile-time-part?] argument indicates if - @racket[expand] - is called or if - @racket[expand-top-level-with-compile-time-evals] - is called when the program is expanded. - Roughly speaking, if your tool will evaluate each expression - itself by calling - @racket[eval] - then pass @racket[#f]. Otherwise, if your tool - just processes the expanded program, be sure to pass - @racket[#t]. - - This function calls - @method[drracket:language:language<%> front-end/complete-program] - to expand the program. Unlike when the @onscreen{Run} is clicked, - however, it does not call - @method[drracket:language:language<%> front-end/finished-complete-program]. - - - The first argument to @racket[iter] is the expanded program - (represented as syntax) or eof. - The @racket[iter] argument is called for each expression in the - expanded program and once more with eof, unless an error is - raised during expansion. - It is called from the user's thread. - If an exception is raised during expansion of the - user's program, @racket[iter] is not called. - Consider setting the exception-handler during @racket[init] to - handle this situation. - - The second argument to @racket[iter] is a thunk that - continues expanding the rest of the contents of the - definitions window. If the first argument to @racket[iter] was - eof, this argument is just the primitive - @racket[void]. - - See also - @racket[drracket:eval:expand-program/multiple].}) - - (proc-doc/names - drracket:eval:traverse-program/multiple - (drracket:language-configuration:language-settings? - (-> void?) - (-> void?) - . -> . - ((or/c port? drracket:language:text/pos?) - ((or/c eof-object? syntax? (cons/c string? any/c)) - (-> any) - . -> . - any) - boolean? - . -> . - void?)) - (language-settings init kill-termination) - - @{This function is similar to - @racket[drracket:eval:expand-program/multiple] - The only difference is that it does not - expand the program in the editor; instead - the processing function can decide how to - expand the program.}) - - (proc-doc/names - drracket:eval:expand-program/multiple - (-> drracket:language-configuration:language-settings? - boolean? - (-> void?) - (-> void?) - (-> (or/c port? drracket:language:text/pos?) - (-> (or/c eof-object? syntax? (cons/c string? any/c)) - (-> any) - any) - boolean? - void?)) - (language-settings eval-compile-time-part? init kill-termination) - - @{This function is just like - @racket[drracket:eval:expand-program] - except that it is curried and the second application - can be used multiple times. - Use this function if you want to initialize the user's - thread (and namespace, etc) once but have program text - that comes from multiple sources. - - The extra boolean argument to the result function - determines if - @racket[drracket:language:language front-end/complete-program<%>] - or - @racket[drracket:language:language front-end/interaction<%>] - is called.}) - - (proc-doc/names - drracket:eval:build-user-eventspace/custodian - (->* (drracket:language-configuration:language-settings? - (-> void?) - (-> void?)) - () - (values eventspace? custodian?)) - ((language-settings init kill-termination) ()) - - @{This function creates a custodian and an eventspace (on the - new custodian) to expand the user's program. It does not - kill this custodian, but it can safely be shutdown (with - @racket[custodian-shutdown-all]) after the - expansion is finished. - - It initializes the - user's eventspace's main thread with several parameters: - @itemize[ - @item{ @racket[current-custodian] is set to a new custodian. - }@item{ - In addition, it calls - @racket[drracket:eval:set-basic-parameters]. - }] - - The @racket[language-settings] argument is the current - language and its settings. See - @racket[drracket:language-configuration:make-language-settings] - for details on that structure. - - If the program is associated with a DrRacket - frame, get the frame's language settings from the - @method[drracket:unit:definitions-text<%> get-next-settings] - method of - @racket[drracket:unit:definitions-text<%>]. Also, the most recently chosen language in - the language dialog is saved via the framework's - preferences. Apply - @racket[preferences:get] - to - @racket[drracket:language-configuration:get-settings-preferences-symbol] - for that @racket[language-settings]. - - The @racket[init] argument is called after the user's parameters - are all set, but before the program is run. It is called on - the user's thread. The - @racket[current-directory] and - @racket[current-load-relative-directory] - parameters are not set, so if there are appropriate directories, - the @racket[init] argument is a good place to set them. - - The @racket[kill-termination] argument is called when the main thread of - the eventspace terminates, no matter if the custodian was - shutdown, or the thread was killed. This procedure is also - called when the thread terminates normally. This procedure is - called from a new, dedicated thread (@italic{i. e.}, not the thread - created to do the expansion, nor the thread that - @racket[drracket:eval:build-user-eventspace/custodian] was called from.)}) - - - - ; - ; - ; - ; ; ; - ; ; ; - ; ; ; - ; ;; ; ;;; ; ;; ; ; ;; ; - ; ; ;; ; ; ;; ; ; ; ; ;; - ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ;;;;;; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; - ; ; ;; ; ;; ; ; ;; ; ;; - ; ;; ; ;;;; ; ;; ;; ; ;; ; - ; ; - ; ; ; - ; ;;;; - - (proc-doc/names - drracket:debug:error-display-handler/stacktrace - (->* (string? any/c) - ((or/c false/c (listof srcloc?)) - #:definitions-text (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) - #:interactions-text (or/c #f (is-a?/c drracket:rep:text<%>)) - ) - any/c) - ((msg exn) ((stack #f) - (defs #f) - (ints #f))) - @{Displays the error message represented by the string, adding - embellishments like those that appears in the DrRacket REPL, - specifically a clickable icon for the stack trace (if the srcloc location is not empty), - and a clickable icon for the source of the error (read & syntax errors show their source - locations and otherwise the first place in the stack trace is shown). - - If @racket[stack] is false, then the stack traces embedded in the @racket[exn] argument (if any) are used. - Specifically, this function looks for a stacktrace via - @racket[errortrace-key] in the continuation marks of @racket[exn] and @racket[continuation-mark-set->context]. - - If @racket[stack] is not false, that stack is added to the stacks already in the exception. - - This should be called in the same eventspace and on the same thread as the error.}) - - (proc-doc/names - drracket:debug:make-debug-error-display-handler - (-> (-> string? (or/c any/c exn?) any) - (-> string? (or/c any/c exn?) any)) - - (oedh) - - @{This function implements an error-display-handler in terms - of another error-display-handler. - - See also Racket's - @racket[error-display-handler] - parameter. - - If the current-error-port is the definitions window in - DrRacket, this error handler inserts some debugging - annotations, calls @racket[oedh], and then highlights the - source location of the runtime error. - - It looks for both stack trace information in the continuation - marks both via the - @schememodname[errortrace/errortrace-key] - module and via - @racket[continuation-mark-set->context]. - - }) - - (proc-doc/names - drracket:debug:hide-backtrace-window - (-> void?) - () - @{Hides the backtrace window.}) - - (proc-doc/names - drracket:debug:add-prefs-panel - (-> void?) - () - @{Adds the profiling preferences panel.}) - - (proc-doc/names - drracket:debug:open-and-highlight-in-file - (->* ((or/c srcloc? (listof srcloc?))) - ((or/c #f (cons/c (λ (x) (and (weak-box? x) - (let ([v (weak-box-value x)]) - (or (not v) - (is-a?/c v editor<%>))))) - number?))) - void?) - ((debug-info) - ((edition-pair #f))) - @{This function opens a DrRacket to display - @racket[debug-info]. Only the src the position - and the span fields of the srcloc are considered. - - The @racket[edition-pair] is used to determine if a - warning message is shown when before opening the file. - If the @racket[edition-pair] is not @racket[#f], it is compared - with the result of @method[text:basic<%> get-edition-number] - of the editor that is loaded to determine if the file has been - edited since the source location was recorded. If so, it - puts up a warning dialog message to that effect.}) - - (proc-doc/names - drracket:debug:show-backtrace-window/edition-pairs - (-> string? - (listof srcloc?) - (listof (or/c #f (cons/c (λ (x) (and (weak-box? x) - (let ([v (weak-box-value x)]) - (or (not v) - (is-a?/c v editor<%>))))) - number?))) - (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) - (or/c #f (is-a?/c drracket:rep:text<%>)) - void?) - (error-message dis editions-pairs defs ints) - @{Shows the backtrace window you get when clicking on the bug in - DrRacket's REPL. - - The @racket[error-message] argument is the text of the error, - @racket[dis] is the debug information, extracted from the - continuation mark in the exception record, using - @racket[errortrace-key]. - - The @racket[editions] argument indicates the editions of any editors - that are open editing the files corresponding to the source locations - - The @racket[defs] argument should be non-@racket[#f] if there are - possibly stacktrace frames that contain unsaved versions of the - definitions window from DrRacket. Similarly, the @racket[ints] argument - should be non-@racket[#f] if there are possibly stacktrace frames that contain - unsaved versions of the interactions window. - - Use - @racket[drracket:rep:current-rep] to get the rep during evaluation of a program. - - }) - - (proc-doc/names - drracket:debug:show-backtrace-window - (->* (string? - (or/c exn? - (listof srcloc?) - (non-empty-listof (cons/c string? (listof srcloc?))))) - ((or/c #f (is-a?/c drracket:rep:text<%>)) - (or/c #f (is-a?/c drracket:unit:definitions-text<%>))) - void?) - ((error-message dis) - ((rep #f) - (defs #f))) - @{Shows the backtrace window you get when clicking on the bug in - DrRacket's REPL. - - This function simply calls @racket[drracket:debug:show-backtrace-window/edition-pairs], - using @racket[drracket:debug:srcloc->edition/pair]. - }) - - (proc-doc/names - drracket:debug:srcloc->edition/pair - (-> srcloc? - (or/c #f (is-a?/c drracket:rep:text<%>)) - (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) - (or/c #f (cons/c (let ([weak-box-containing-an-editor? - (λ (x) (and (weak-box? x) - (let ([v (weak-box-value x)]) - (or (not v) - (is-a?/c v editor<%>)))))]) - weak-box-containing-an-editor?) - number?))) - (srcloc ints defs) - @{Constructs a edition pair from a source location, - returning the current edition of the editor editing - the source location (if any). - - The @racket[ints] and @racket[defs] arguments are used to map source locations, - in the case that the source location corresponds to the definitions - window (when it has not been saved) or the interactions window. - }) - - - - ; - ; - ; - ; ;; ;; ;;; ;; - ; ;; ;; ;; ;; - ; ;; ;; ;; ;; - ; ;;;;;; ;;;; ;; ;;;;; ;;;;; ;;;; ;;;; ;; ;; - ; ;; ;; ;;; ;; ;; ;; ;; ;; ;;; ;;; ;; ;; ; ;; ; - ; ;; ;; ;;;;;; ;; ;; ;; ;;;;;;; ;; ;;;;;; ;;;; ;;;; - ; ;; ;; ;; ;; ;; ;; ;;;;;;; ;; ;; ;;;; ;;;;; - ; ;; ;; ;;; ; ;; ;; ;; ;; ;; ;;; ; ; ;; ;; ;; - ; ;; ;;; ;;;; ;; ;;;;; ;;;;;; ;;;; ;;;; ;; ;;; - ; ;; - ; ;; - ; ;; - - (proc-doc/names - drracket:help-desk:help-desk - (->* () - ((or/c #f string?) - (or/c #f string? (list/c string? string?))) - any) - (() - ((search-key #f) - (search-context #f))) - @{if @racket[search-key] is a string, calls @racket[perform-search] with - @racket[search-key] and @racket[search-context]. - - Otherwise, calls @racket[send-main-page] with no arguments.}) - - - ; - ; - ; - ; ; - ; - ; ; - ; ; ; ; ;; ; ;;;; - ; ; ; ;; ; ; ; - ; ; ; ; ; ; ; - ; ; ; ; ; ; ; - ; ; ; ; ; ; ; - ; ; ;; ; ; ; ; - ; ;; ; ; ; ; ;; - ; - ; - ; - - - (proc-doc/names - drracket:unit:get-program-editor-mixin - (-> ((subclass?/c text%) . -> . (subclass?/c text%))) - () - @{Returns a mixin that must be mixed in to any - @racket[text%] object that might contain - program text (and thus can be in the source - field of some syntax object). - - See also - @racket[drracket:unit:add-to-program-editor-mixin].}) - - (proc-doc/names - drracket:unit:add-to-program-editor-mixin - (((subclass?/c text%) . -> . (subclass?/c text%)) . -> . void?) - (mixin) - @{@phase[1] - - Adds @racket[mixin] to the result of - @racket[drracket:unit:get-program-editor-mixin].}) - - (proc-doc/names - drracket:unit:open-drscheme-window - (case-> - (-> (is-a?/c drracket:unit:frame%)) - ((or/c string? false/c) . -> . (is-a?/c drracket:unit:frame%))) - (() (filename)) - - @{Opens a DrRacket frame that displays - @racket[filename], - or nothing if @racket[filename] is @racket[#f] or not supplied.}) - - ; - ; - ; - ; ; - ; ; - ; ; - ; ; ;; ;; ;;; ;; ; ;;; ;;; - ; ;; ;; ; ; ; ; ;; ; ; ; - ; ; ; ; ; ; ; ; ; ; ;; - ; ; ; ; ; ; ; ; ;;;;;; ;; - ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ;; ; ; - ; ; ; ; ;;; ;; ; ;;;; ;;; - ; - ; - ; - - - (proc-doc/names - drracket:modes:add-mode - (string? - (or/c false/c (is-a?/c mode:surrogate-text<%>)) - ((is-a?/c drracket:rep:text%) number? . -> . boolean?) - ((or/c false/c (listof string?)) . -> . boolean?) - . -> . - drracket:modes:mode?) - (name surrogate repl-submit matches-language) - @{Adds a mode to DrRacket. Returns a mode value - that identifies the mode. - - The first argument, @racket[name], is the name - of the mode, used in DrRacket's GUI to allow - the user to select this mode. - - The @racket[surrogate] argument is set to the - definitions text and the interactions text - (via the - @racket[mode:host-text set-surrogate<%>] - method) whenever this mode is enabled. - - The @racket[repl-submit] procedure is called - whenever the user types a return in the interactions - window. It is passed the interactions editor - and the position where the last prompt occurs. - If it - returns @racket[#t], the text after the last - prompt is treated as a program fragment and - evaluated, according to the language settings. - If it returns @racket[#f], the text is - assumed to be an incomplete program fragment, and - the keystroke is not treated specially. - - The @racket[matches-language] predicate is called whenever - the language changes. If it returns @racket[#t] - this mode is installed. It is passed the list of strings - that correspond to the names of the language in the - language dialog. - - Modes are tested in the opposite order that they are - added. That is, the last mode to be added gets tested - first when the filename changes or when the language - changes. - - See also - @racket[drracket:modes:get-modes].}) - - (proc-doc/names - drracket:modes:mode? - (any/c . -> . boolean?) - (val) - @{Determines if @racket[val] is a mode.}) - - (proc-doc/names - drracket:modes:get-modes - (-> (listof drracket:modes:mode?)) - () - @{Returns all of the modes currently added to DrRacket. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-name - (drracket:modes:mode? . -> . string?) - (mode) - @{Extracts the name of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-surrogate - (drracket:modes:mode? . -> . (or/c false/c (is-a?/c mode:surrogate-text<%>))) - (mode) - @{Extracts the surrogate of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-repl-submit - (drracket:modes:mode? . -> . any) - (mode) - @{Extracts the repl submission predicate of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-matches-language - (drracket:modes:mode? . -> . ((or/c false/c (listof string?)) . -> . boolean?)) - (mode) - @{Extracts the language matching predicate of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - - ; - ; - ; - ; - ; - ; - ; ; ; ;;; ; ;; - ; ;; ; ; ;; ; - ; ; ; ; ; ; - ; ; ;;;;;; ; ; - ; ; ; ; ; - ; ; ; ;; ; - ; ; ;;;; ; ;; - ; ; - ; ; - ; ; - - - (proc-doc/names - drracket:rep:get-welcome-delta - (-> (is-a?/c style-delta%)) - () - @{Returns a style delta that matches the style and color of the - phrase ``Welcome to'' in the beginning of the interactions window.}) - - (proc-doc/names - drracket:rep:get-dark-green-delta - (-> (is-a?/c style-delta%)) - () - @{Returns a style delta that matches the style and color of the - name of a language in the interactions window.}) - - (proc-doc/names - drracket:rep:get-drs-bindings-keymap - (-> (is-a?/c keymap%)) - () - @{Returns a keymap that binds various DrRacket-specific - keybindings. This keymap is used in the definitions - and interactions window. - - Defaultly binds C-x;o to a function that switches - the focus between the definitions and interactions - windows. Also binds f5 to Execute and f1 to Help Desk.}) - - (proc-doc/names - drracket:rep:current-rep - (-> (or/c false/c (is-a?/c drracket:rep:text%))) - () - - @{This is a parameter whose value should not be set by tools. - It is initialized to the repl that controls this evaluation - in the user's thread. - - It only returns @racket[#f] if the program not running - in the context of a repl (eg, the test suite window).}) - - (proc-doc/names - drracket:rep:current-value-port - (-> (or/c false/c port?)) - () - @{This is a parameter whose value is a port that - prints in the REPL in blue. It is used to print - the values of toplevel expressions in the REPL. - - It is only initialized on the user's thread.}) - - - ; - ; - ; - ; ; ; - ; ; ; - ; ; ; ; ; - ; ;; ; ;;; ;;;; ; ;;; ; ; ;;;; ;;; ; ;; ;; ; - ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; ; ; ;; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ;;;;;; ; ; ;;;;;; ; ; ;;;;;; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; - ; ;; ; ;;;; ;; ; ;;;; ; ; ;; ;;;; ; ; ;; ; - ; ; ; - ; ; ; ; - ; ;;;; - - - (proc-doc/names - drracket:get/extend:extend-tab - (case-> - ((make-mixin-contract drracket:unit:tab<%>) . -> . void?) - ((make-mixin-contract drracket:unit:tab<%>) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This class implements the tabs in DrRacket. One is created for each tab - in a frame (each frame always has at least one tab, even if the tab bar is not shown) - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#t].}) - - (proc-doc/names - drracket:get/extend:extend-interactions-text - (case-> - ((make-mixin-contract drracket:rep:text<%>) . -> . void?) - ((make-mixin-contract drracket:rep:text<%>) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This text is used in the bottom window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#t].}) - - (proc-doc/names - drracket:get/extend:get-interactions-text - (-> (implementation?/c drracket:rep:text<%>)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-interactions-text] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-definitions-text - (case-> - ((make-mixin-contract drracket:unit:definitions-text<%>) . -> . void?) - ((make-mixin-contract drracket:unit:definitions-text<%>) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This text is used in the top window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-definitions-text - (-> (implementation?/c drracket:unit:definitions-text<%>)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-definitions-text] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-interactions-canvas - (case-> - ((make-mixin-contract drracket:unit:interactions-canvas%) . -> . void?) - ((make-mixin-contract drracket:unit:interactions-canvas%) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This canvas is used in the bottom window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-interactions-canvas - (-> (subclass?/c drracket:unit:interactions-canvas%)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-interactions-canvas] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-definitions-canvas - (case-> - ((make-mixin-contract drracket:unit:definitions-canvas%) . -> . void?) - ((make-mixin-contract drracket:unit:definitions-canvas%) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This canvas is used in the top window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-definitions-canvas - (-> (subclass?/c drracket:unit:definitions-canvas%)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-definitions-canvas] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-unit-frame - (case-> - ((make-mixin-contract drracket:unit:frame%) . -> . void?) - ((make-mixin-contract drracket:unit:frame%) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This is the frame that implements the main DrRacket window. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-unit-frame - (-> (subclass?/c drracket:unit:frame%)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-unit-frame] - raises an error, disallowing any more extensions.}) - - - - ; - ; - ; - ; - ; ; ;;; - ; ;;; - ; ;;;; ;;; ;;;;;;; ;;; ;;; ;;; ;; ;; ;;; - ; ;;;; ;;;;;;;;;;;; ;;;;; ;;; ;;;;;;; ;;;;;;; - ; ;;; ;;; ;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; - ; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;; ;;; ;;; - ; ;;; ;;; ;;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; - ; ;;;; ;;; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;;;;;; - ; ;;; ;;; ;;;;;; ;;; ;;; ;;; ;;; ;; ;;; - ; ;;; - ; ;;;;;; - ; - ; - - (proc-doc/names - drracket:tracing:annotate - (-> syntax? syntax?) - (stx) - @{Call this function to add tracing annotations to the a fully-expanded - expression. When the program runs, DrRacket will pop open the tracing - window to display the trace.}) - - ; - ; - ; - ; ; - ; ; - ; ; - ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; - ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; - ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; - ; ; ; - ; ; ; ; ; - ; ;;;; ;;;; - ; - ; - ; - ; ;;; ; ; - ; ; - ; ; ; - ; ;;; ;;; ; ;; ;;;; ; ;; ; ; ; ; ; ;;; ;;;; ; ;;; ; ;; - ; ; ; ; ; ;; ; ; ; ; ;; ; ; ;; ; ; ; ; ; ; ;; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ;;;; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ;; ; ;; ; ; ; ; ; ; ; ; ; - ; ;;; ;;; ; ; ; ; ;; ; ;; ; ; ;;;;; ;; ; ;;; ; ; - ; ; - ; ; ; - ; ;;;; - - (proc-doc/names - drracket:language-configuration:get-languages - (-> (listof (is-a?/c drracket:language:language<%>))) - () - @{This can only be called after all of the tools initialization phases have completed. - - Returns the list of all of the languages installed in DrRacket.}) - - (proc-doc/names - drracket:language-configuration:add-language - ((and/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) - . -> . void?) - (language) - - @{@phase[2] - - Adds @racket[language] to the languages offerend by DrRacket.}) - - (proc-doc/names - drracket:language-configuration:get-settings-preferences-symbol - (-> symbol?) - () - @{Returns the symbol that is used to store the user's language - settings. Use as an argument to either - @racket[preferences:get] - or - @racket[preferences:set].}) - - (proc-doc/names - drracket:language-configuration:make-language-settings - ((or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) - any/c - . -> . - drracket:language-configuration:language-settings?) - (language settings) - - @{This is the constructor for a record consisting of two - elements, a language and its settings. - - The settings is a language-specific record that holds a - value describing a parameterization of the language. - - It has two selectors, - @racket[drracket:language-configuration:language-settings-language] - and - @racket[drracket:language-configuration:language-settings-settings], and a predicate, - @racket[drracket:language-configuration:language-settings?]}) - - (proc-doc/names - drracket:language-configuration:language-settings-settings - (-> drracket:language-configuration:language-settings? - any/c) - (ls) - @{Extracts the settings field of a language-settings.}) - - (proc-doc/names - drracket:language-configuration:language-settings-language - (drracket:language-configuration:language-settings? - . -> . - (or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c)) - (ls) - - @{Extracts the language field of a language-settings.}) - - (proc-doc/names - drracket:language-configuration:language-settings? - (any/c . -> . boolean?) - (val) - - @{Determines if the argument is a language-settings or not.}) - - (proc-doc/names - drracket:language-configuration:language-dialog - (->* (boolean? drracket:language-configuration:language-settings?) - ((or/c false/c (is-a?/c top-level-window<%>))) - (or/c false/c drracket:language-configuration:language-settings?)) - ((show-welcome? language-settings-to-show) - ((parent #t))) - @{Opens the language configuration dialog. - See also - @racket[drracket:language-configuration:fill-language-dialog]. - - The @racket[show-welcome?] argument determines if - if a ``Welcome to DrRacket'' message and some - natural language buttons are shown. - - The @racket[language-settings-to-show] argument - must be some default language settings that the dialog - is initialized to. - If unsure of a default, the currently set language - in the user's preferences can be obtained via: - @schemeblock[ - (preferences:get (drracket:language-configuration:get-settings-preferences-symbol)) - ] - - The @racket[parent] argument is used as the parent - to the dialog. - - The result if @racket[#f] when the user cancells the dialog, and - the selected language if they hit ok.}) - - (proc-doc/names - drracket:language-configuration:fill-language-dialog - (->* - ((is-a?/c vertical-panel%) - (is-a?/c area-container<%>) - drracket:language-configuration:language-settings?) - ((or/c false/c (is-a?/c top-level-window<%>)) - (-> symbol? void?)) - drracket:language-configuration:language-settings?) - ((panel button-panel language-setting) - ((re-center #f) - (ok-handler void))) - @{This procedure accepts two parent panels and - fills them with the contents of the language dialog. - It is used to include language configuration controls - in some larger context in another dialog. - - The @racket[panel] argument is the main panel where the - language controls will be placed. - The function adds buttons to the @racket[button-panel] - to revert a language to its default settings and to - show the details of a language. - - The @racket[language-setting] is the default - language to show in the dialog. - - The @racket[re-center] argument is used when the @onscreen{Show Details} - button is clicked. If that argument is a @racket[top-level-window<%>], - the @onscreen{Show Details} callback will recenter the window each time - it is clicked. Otherwise, the argument is not used. - - @racket[ok-handler] is a function that is in charge of interfacing the OK - button. It should accept a symbol message: @racket['enable] and - @racket['disable] to toggle the button, and @racket['execute] to run - the desired operation. (The language selection dialog also uses an - internal @racket['enable-sync] message.)}) - - (proc-doc - drracket:language:register-capability - (->d ([s symbol?] - [the-contract contract?] - [default the-contract]) - () - [res void?]) - @{Registers a new capability with a default value for each language - and a contract on the values the capability might have. - - By default, these capabilities are registered as DrRacket starts up: - @(let-syntax ([cap (syntax-rules () - [(cap key contract default desc ...) - (item @racket['key : contract = default] - "--- " desc ...)])]) - (itemize - @cap[drracket:check-syntax-button boolean? #t]{controls the visiblity of the check syntax button} - @cap[drracket:language-menu-title - string? - (string-constant scheme-menu-name)]{ - controls the name of the menu just to the right of the language - menu (defaultly named ``Racket'')} - @cap[drscheme:define-popup - (or/c #f - (list/c string? string? string?) - (cons/c string? string?)) - (list "(define" "(define ...)" "δ")]{ - specifies the prefix that the define popup should look for and what - label it should have, or @racket[#f] if it should not appear at all. - - If the list of three strings alternative is used, the first string is - the prefix that is looked for when finding definitions. The second - and third strings are used as the label of the control, in horizontal - and vertical mode, respectively. - - The pair of strings alternative is deprecated. If it is used, - the pair @racket[(cons a-str b-str)] is the same as @racket[(list a-str b-str "δ")].} - @cap[drscheme:help-context-term (or/c false/c string?) #f]{ - specifies a context query for documentation searches that are - initiated in this language, can be @racket[#f] (no change to the - user's setting) or a string to be used as a context query (note: the - context is later maintained as a cookie, @racket[""] is different - from @racket[#f] in that it clears the stored context)} - @cap[drscheme:special:insert-fraction boolean? #t]{ - determines if the insert fraction menu item in the special menu is - visible} - @cap[drscheme:special:insert-lambda boolean? #t]{ - determines if the insert lambda menu item in the special menu is - visible} - @cap[drscheme:special:insert-large-letters boolean? #t]{ - determines if the insert large letters menu item in the special menu - is visible} - @cap[drscheme:special:insert-image boolean? #t]{ - determines if the insert image menu item in the special menu is - visible} - @cap[drscheme:special:insert-comment-box boolean? #t]{ - determines if the insert comment box menu item in the special menu - is visible} - @cap[drscheme:special:insert-gui-tool boolean? #t]{ - determines if the insert gui menu item in the special menu is - visible} - @cap[drscheme:special:slideshow-menu-item boolean? #t]{ - determines if the insert pict box menu item in the special menu is - visible} - @cap[drscheme:special:insert-text-box boolean? #t]{ - determines if the insert text box menu item in the special menu is - visible} - @cap[drscheme:special:xml-menus boolean? #t]{ - determines if the insert scheme box, insert scheme splice box, and - the insert xml box menu item in the special menu are visible} - @cap[drscheme:autocomplete-words (listof string?) '()]{ - determines the list of words that are used when completing words in - this language} - @cap[drscheme:tabify-menu-callback - (or/c false/c (-> (is-a?/c text%) number? number? void?)) - (λ (t a b) (send t tabify-selection a b))]{ - is used as the callback when the ``Reindent'' or ``Reindent All'' - menu is selected. The first argument is the editor, and the second - and third are a range in the editor.} - ))}) - - (proc-doc/names - drracket:language:capability-registered? - (-> symbol? boolean?) - (s) - @{Indicates if - @racket[drracket:language:register-capability] - has been called with @racket[s].}) - (proc-doc - drracket:language:get-capability-default - (->d ([s (and/c symbol? drracket:language:capability-registered?)]) - () - [res (drracket:language:get-capability-contract s)]) - @{Returns the default for a particular capability.}) - (proc-doc/names - drracket:language:get-capability-contract - (-> (and/c symbol? drracket:language:capability-registered?) - contract?) - (s) - @{Returns the contract for a given capability, which was specified - when @racket[drracket:language:register-capability] was called.}) - - - ; - ; - ; - ; ; - ; ; - ; ; - ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; - ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; - ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; - ; ; ; - ; ; ; ; ; - ; ;;;; ;;;; - - - (proc-doc/names - drracket:language:add-snip-value - (->* ((-> any/c boolean?) - (-> any/c (is-a?/c snip%))) - ((-> any/c)) - void?) - ((test-value convert-value) - ((setup-thunk void))) - @{Registers a handler to convert values into snips as they are printed in the REPL. - - The @racket[test-snip] argument is called to determine if this handler can convert the value - and the @racket[convert-value] argument is called to build a snip. - The (optional) @racket[setup-thunk] is called just after the user's namespace and other - setings are built, but before any of the user's code is evaluated. - - All three functions are called on the user's thread and with the user's settings.}) - - (proc-doc/names - drracket:language:extend-language-interface - (-> interface? - (make-mixin-contract drracket:language:language<%>) - void?) - (interface default-implementation) - - @{@phase[1] - - Each language added passed to - @racket[drracket:language-configuration:add-language] - must implement @racket[interface]. - - The @racket[default-implementation] is a mixin - that provides a default implementation of - @racket[interface]. Languages that are unaware of - the specifics of @racket[extension] use - @racket[default-implementation] via - @racket[drracket:language:get-default-mixin].}) - - (proc-doc - drracket:language:get-default-mixin - (-> (make-mixin-contract drracket:language:language<%>)) - - @{@phase[2] - - The result of this function is the composite of all of the - @racket[default-implementation] arguments passed - to - @racket[drracket:language:extend-language-interface].}) - - (proc-doc/names - drracket:language:get-language-extensions - (-> (listof interface?)) - () - @{@phase[2] - - Returns a list of the interfaces passed to - @racket[drracket:language:extend-language-interface].}) - - (proc-doc/names - drracket:language:put-executable - ((is-a?/c top-level-window<%>) - path? - (or/c boolean? (symbols 'launcher 'standalone 'distribution)) - boolean? - string? - . -> . (or/c false/c path?)) - (parent program-filename mode mred? title) - @{Calls the MrEd primitive - @racket[put-file] - with arguments appropriate for creating an executable - from the file @racket[program-filename]. - - The arguments @racket[mred?] and @racket[mode] indicates - what type of executable this should be (and the dialog - may be slightly different on some platforms, depending - on these arguments). For historical reasons, @racket[#f] - is allowed for @racket[mode] as an alias for @racket['launcher], and - @racket[#t] is allowed for @racket[mode] as an alias for @racket['stand-alone]. - - The @racket[title] argument is used as the title to the primitive - @racket[put-file] - or - @racket[get-directory] - primitive.}) - - (proc-doc/names - drracket:language:create-executable-gui - ((or/c false/c (is-a?/c top-level-window<%>)) - (or/c false/c string?) - (or/c (λ (x) (eq? x #t)) (symbols 'launcher 'standalone 'distribution)) - (or/c (λ (x) (eq? x #t)) (symbols 'mzscheme 'mred)) - . -> . - (or/c false/c - (list/c (symbols 'no-show 'launcher 'stand-alone 'distribution) - (symbols 'no-show 'mred 'mzscheme) - string?))) - (parent program-name show-type show-base) - @{Opens a dialog to prompt the user about their choice of executable. - If @racket[show-type] is @racket[#t], the user is prompted about - a choice of executable: stand-alone, - launcher, or distribution; otherwise, the symbol determines the type. - If @racket[show-base] - is @racket[#t], the user is prompted about a choice of base - binary: mzscheme or mred; otherwise the symbol determines the base. - - The @racket[program-name] argument is used to construct the default - executable name in a platform-specific manner. - - The @racket[parent] argument is used for the parent of the dialog. - - The result of this function is @racket[#f] if the user cancel's - the dialog and a list of three items indicating what options - they chose. If either @racket[show-type] or @racket[show-base] - was not @racket[#t], the corresponding result will be @racket['no-show], - otherwise it will indicate the user's choice.}) - - (proc-doc/names - drracket:language:create-module-based-stand-alone-executable - ((or/c path? string?) - (or/c path? string?) any/c any/c any/c boolean? boolean? - . -> . - void?) - (program-filename - executable-filename - module-language-spec - transformer-module-language-spec - init-code - gui? - use-copy?) - - @{This procedure creates a stand-alone executable in the file - @racket[executable-filename] that runs the program - @racket[program-filename]. - - The arguments - @racket[module-language-spec] and - @racket[transformer-module-language-spec] specify the - settings of the initial namespace, both the transformer - portion and the regular portion. Both may be @racket[#f] - to indicate there are no initial bindings. - - The @racket[init-code] argument is an s-expression representing - the code for a module. This module is expected to provide - the identifer @racket[init-code], bound to a procedure of no - arguments. That module is required and the @racket[init-code] - procedure is executed to initialize language-specific - settings before the code in @racket[program-filename] runs. - - The @racket[gui?] argument indicates if a GRacket or Racket - stand-alone executable is created. - - The @racket[use-copy?] argument indicates if the initial - namespace should be populated with - @racket[namespace-require/copy] or - @racket[namespace-require]. }) - - (proc-doc/names - drracket:language:create-module-based-distribution - ((or/c path? string?) - (or/c path? string?) any/c any/c any/c boolean? boolean? - . -> . - void?) - (program-filename - distribution-filename - module-language-spec - transformer-module-language-spec - init-code - gui? - use-copy?) - - @{Like - @racket[drracket:language:create-module-based-stand-alone-executable], but packages the stand-alone executable into a distribution.}) - - (proc-doc/names - drracket:language:create-distribution-for-executable - ((or/c path? string?) - boolean? - (-> path? void?) - . -> . - void?) - (distribution-filename - gui? - make-executable) - - @{Creates a distribution where the given @racket[make-executable] procedure - creates the stand-alone executable to be distributed. - The @racket[make-executable] procedure is given the name of the - executable to create. The @racket[gui?] argument is needed in case the - executable's name (which @racket[drracket:language:create-distribution-for-executable] - must generate) depends on the type of executable. During the distribution-making - process, a progress dialog is shown to the user, and the user can click an - @onscreen{Abort} button that sends a break to the current thread.}) - - (proc-doc/names - drracket:language:create-module-based-launcher - ((or/c path? string?) (or/c path? string?) any/c any/c any/c boolean? boolean? - . -> . - void?) - (program-filename - executable-filename - module-language-spec - transformer-module-language-spec - init-code - gui? - use-copy?) - - @{This procedure is identical to - @racket[drracket:language:create-module-based-stand-alone-executable], except that it creates a launcher instead of a - stand-alone executable.}) - - (proc-doc/names - drracket:language:simple-module-based-language-convert-value - (-> any/c drracket:language:simple-settings? any) - (value settings) - @{The result can be either one or two values. The first result is - the converted value. The second result is @racket[#t] if the converted - value should be printed with @racket[write] (or @racket[pretty-write]), - @racket[#f] if the converted result should be printed with - @racket[print] (or @racket[pretty-print]); the default second - result is @racket[#t]. - - The default implementation of this method depends on the - @racket[simple-settings-printing-style] field of @racket[settings]. - If it is @racket['print], the - result is @racket[(values value #f)]. If it is @racket['write] or @racket['trad-write], - the result is just @racket[value]. Otherwise, the result is produce by - adjusting the @racket[constructor-style-printing] and @racket[show-sharing] - parameters based on @racket[settings], setting @racket[current-print-convert-hook] - to ignore snips, and then applying @racket[print-convert] to @racket[value].}) - - (proc-doc/names - drracket:language:setup-printing-parameters - (-> (-> any) drracket:language:simple-settings? (or/c number? 'infinity) any) - (thunk settings width) - @{Sets all of the @racket[pretty-print] and @racket[print-convert] parameters - either to the defaults to values based on @racket[settings] - and then invokes @racket[thunk], returning what it returns.}) - - (proc-doc/names - drracket:language:text/pos-text - (drracket:language:text/pos? . -> . (is-a?/c text%)) - (text/pos) - - @{Selects the @racket[text%] from a text/pos.}) - - (proc-doc/names - drracket:language:text/pos-start - (drracket:language:text/pos? . -> . number?) - (text/pos) - - @{Selects the starting position from a text/pos.}) - - (proc-doc/names - drracket:language:text/pos-end - (drracket:language:text/pos? . -> . number?) - (text/pos) - - @{Selects the ending position from a text/pos.}) - - (proc-doc/names - drracket:language:text/pos? - (any/c . -> . boolean?) - (val) - - @{Returns @racket[#t] if @racket[val] is a text/pos, and @racket[#f] - otherwise.}) - - (proc-doc/names - drracket:language:make-text/pos - ((is-a?/c text%) number? number? - . -> . - drracket:language:text/pos?) - (text start end) - - @{Constructs a text/pos.}) - - (proc-doc/names - drracket:language:simple-settings-case-sensitive - (drracket:language:simple-settings? . -> . boolean?) - (simple-settings) - - @{Extracts the case-sensitive setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-printing-style - (drracket:language:simple-settings? - . -> . - (symbols 'constructor 'quasiquote 'write 'print)) - (simple-settings) - - @{Extracts the printing-style setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-fraction-style - (drracket:language:simple-settings? - . -> . - (symbols 'mixed-fraction - 'mixed-fraction-e - 'repeating-decimal - 'repeating-decimal-e)) - (simple-settings) - - @{Extracts the fraction-style setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-show-sharing - (drracket:language:simple-settings? - . -> . - boolean?) - (simple-settings) - - @{Extracts the show-sharing setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-insert-newlines - (drracket:language:simple-settings? - . -> . - boolean?) - (simple-settings) - - @{Extracts the insert-newline setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-annotations - (drracket:language:simple-settings? - . -> . - (symbols 'none 'debug 'debug/profile 'test-coverage)) - (simple-settings) - - @{Extracts the debugging setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings? - (any/c . -> . boolean?) - (val) - - @{Determines if @racket[val] is a simple-settings.}) - - (proc-doc/names - drracket:language:make-simple-settings - (-> boolean? - (symbols 'constructor 'quasiquote 'write 'trad-write 'print) - (symbols 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e) - boolean? - boolean? - (symbols 'none 'debug 'debug/profile 'test-coverage) - drracket:language:simple-settings?) - (case-sensitive - printing-style - fraction-style - show-sharing - insert-newlines - annotations) - - @{Constructs a simple settings.}) - - (proc-doc/names - drracket:language:simple-settings->vector - (drracket:language:simple-settings? . -> . vector?) - (simple-settings) - - @{Constructs a vector whose elements are the fields of @racket[simple-settings].})) +#lang racket/base +(require drracket/tool-lib) +(provide (all-from-out drracket/tool-lib)) diff --git a/collects/drscheme/tool.rkt b/collects/drscheme/tool.rkt index 9d0842fc64..50df191632 100644 --- a/collects/drscheme/tool.rkt +++ b/collects/drscheme/tool.rkt @@ -1,6 +1,3 @@ #lang racket/base -(require "private/drsig.ss") -(provide drracket:tool^ - drracket:tool-exports^ - drscheme:tool^ - (rename-out [drracket:tool-exports^ drscheme:tool-exports^])) +(require drracket/tool) +(provide (all-from-out drracket/tool)) diff --git a/collects/framework/private/scheme.rkt b/collects/framework/private/scheme.rkt index 96c002c075..f704fde98c 100644 --- a/collects/framework/private/scheme.rkt +++ b/collects/framework/private/scheme.rkt @@ -1186,7 +1186,7 @@ (values lexeme type paren start end backup-delta mode))))) (define/override (put-file text sup directory default-name) - (parameterize ([finder:default-extension "ss"] + (parameterize ([finder:default-extension "rkt"] [finder:default-filters '(["Racket Sources" "*.rkt;*.ss;*.scm"] ["Any" "*.*"])]) ;; don't call the surrogate's super, since it sets the default extension diff --git a/collects/macro-debugger/syntax-browser/text.rkt b/collects/macro-debugger/syntax-browser/text.rkt index 8ab05c867c..6af632acf1 100644 --- a/collects/macro-debugger/syntax-browser/text.rkt +++ b/collects/macro-debugger/syntax-browser/text.rkt @@ -2,7 +2,7 @@ (require scheme/list scheme/class scheme/gui - drscheme/arrow + drracket/arrow framework/framework unstable/interval-map unstable/gui/notify diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 474b111882..f7caf24f44 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -353,7 +353,7 @@ mz-manuals := (scribblings: "main/") ; generates main pages (next line) mr-base := (package: "mred") (notes: "gracket") (bin: "mred-text") (collects: "afm/") mr-manuals := (doc+src: "gui/") -dr-base := (package: "drscheme") (doc: "drracket") (notes: "drracket") (package: "framework") +dr-base := (package: "drracket") (package: "drscheme") (package: "framework") dr-manuals := (doc+src: "tools/") ;; Misc hooks, to be added on by package rules below diff --git a/collects/meta/props b/collects/meta/props index 61b10c3dd7..b6b17c34ba 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -564,53 +564,57 @@ path/s is either such a string or a list of them. "collects/deinprogramm/turtle.rkt" drdr:command-line "mred-text -t ~s" "collects/deinprogramm/world.rkt" drdr:command-line "mred-text -t ~s" "collects/drscheme" responsible (robby) -"collects/drscheme/arrow.rkt" drdr:command-line "mred-text -t ~s" "collects/drscheme/drscheme.rkt" drdr:command-line "mzc ~s" "collects/drscheme/main.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/app.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/auto-language.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/bindings-browser.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/bitmap-message.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/debug.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/drscheme-normal.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/eb.rkt" drdr:command-line "mred-text ~s" -"collects/drscheme/private/embedded-snip-utils.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/eval.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/font.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/frame.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/help-desk.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/honu-logo.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/init.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/insert-large-letters.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/label-frame-mred.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/language-configuration.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/language-object-contract.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/language.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/launcher-mred-bootstrap.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/launcher-mz-bootstrap.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/link.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/main.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/modes.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/module-browser.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/module-language-tools.rkt" drdr:command-line "mred-text ~s" -"collects/drscheme/private/module-language.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/multi-file-search.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/number-snip.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/palaka.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/prefs-contract.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/profile-drs.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/rep.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/stick-figures.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/syncheck-debug.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/text.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/tools-drs.rkt" drdr:command-line "mred ~s" -"collects/drscheme/private/tools.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/tracing.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/unit.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/sprof.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/syncheck-drracket-button.rkt" drdr:command-line "mred-text ~s" -"collects/drscheme/syncheck.rkt" drdr:command-line "mred-text -t ~s" "collects/drscheme/tool-lib.rkt" drdr:command-line "mzc ~s" +"collects/drracket" responsible (robby) +"collects/drracket/arrow.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/drracket.rkt" drdr:command-line "mzc ~s" +"collects/drracket/main.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/app.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/auto-language.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/bindings-browser.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/bitmap-message.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/debug.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/drracket-normal.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/eb.rkt" drdr:command-line "mred-text ~s" +"collects/drracket/private/embedded-snip-utils.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/eval.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/font.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/frame.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/help-desk.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/honu-logo.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/init.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/insert-large-letters.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/label-frame-mred.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/language-configuration.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/language-object-contract.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/language.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/launcher-mred-bootstrap.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/launcher-mz-bootstrap.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/link.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/main.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/modes.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/module-browser.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/module-language-tools.rkt" drdr:command-line "mred-text ~s" +"collects/drracket/private/module-language.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/multi-file-search.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/number-snip.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/palaka.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/prefs-contract.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/profile-drs.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/rep.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/stick-figures.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/syncheck-debug.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/text.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/tools-drs.rkt" drdr:command-line "mred ~s" +"collects/drracket/private/tools.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/tracing.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/unit.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/sprof.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/syncheck-drracket-button.rkt" drdr:command-line "mred-text ~s" +"collects/drracket/syncheck.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/tool-lib.rkt" drdr:command-line "mzc ~s" "collects/dynext" responsible (mflatt) "collects/dynext/private/macinc.rkt" drdr:command-line "mzscheme -f ~s" "collects/dynext/private/stdio.rkt" drdr:command-line "" @@ -1332,22 +1336,22 @@ path/s is either such a string or a list of them. "collects/tests/deinprogramm" responsible (sperber) "collects/tests/deinprogramm/image.rkt" drdr:command-line "mred-text -t ~s" "collects/tests/deinprogramm/run-image-test.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme" responsible (robby) -"collects/tests/drscheme/drscheme-test-util.rkt" drdr:command-line "mred -t ~s" -"collects/tests/drscheme/io.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 -"collects/tests/drscheme/module-lang-test-utils.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme/module-lang-test.rkt" drdr:command-line "mred ~s" drdr:timeout 120 -"collects/tests/drscheme/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s" -"collects/tests/drscheme/randomly-click-preferences.rkt" drdr:command-line "mzc ~s" -"collects/tests/drscheme/randomly-click.rkt" drdr:command-line "" -"collects/tests/drscheme/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 -"collects/tests/drscheme/sample-solutions-one-window.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme/save-teaching-lang-file.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/stepper-test.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme/syncheck-test.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/teachpack.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket" responsible (robby) +"collects/tests/drracket/drscheme-test-util.rkt" drdr:command-line "mred -t ~s" +"collects/tests/drracket/io.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 +"collects/tests/drracket/module-lang-test-utils.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket/module-lang-test.rkt" drdr:command-line "mred ~s" drdr:timeout 120 +"collects/tests/drracket/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s" +"collects/tests/drracket/randomly-click-preferences.rkt" drdr:command-line "mzc ~s" +"collects/tests/drracket/randomly-click.rkt" drdr:command-line "" +"collects/tests/drracket/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 +"collects/tests/drracket/sample-solutions-one-window.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket/save-teaching-lang-file.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/stepper-test.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket/syncheck-test.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/teachpack.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s" "collects/tests/framework" responsible (robby) "collects/tests/framework/canvas.rkt" drdr:command-line "mzc -k ~s" "collects/tests/framework/debug.rkt" drdr:command-line "mzc -k ~s" diff --git a/collects/scribblings/drracket/keybindings.scrbl b/collects/scribblings/drracket/keybindings.scrbl index 1beb739047..8b6f3053b2 100644 --- a/collects/scribblings/drracket/keybindings.scrbl +++ b/collects/scribblings/drracket/keybindings.scrbl @@ -205,7 +205,7 @@ s-exp framework/keybinding-lang The @racket[framework/keybinding-lang] languages provides all of the bindings from @racketmodname[racket], @racketmodname[racket/class], and -@racketmodname[drscheme/tool-lib], +@racketmodname[drracket/tool-lib], except that it adjusts @|mz-mod-begin| to introduce a @racketidfont{keybinding} form: diff --git a/collects/scribblings/main/acks.scrbl b/collects/scribblings/main/acks.scrbl index 64caf9502e..547c7f5c58 100644 --- a/collects/scribblings/main/acks.scrbl +++ b/collects/scribblings/main/acks.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require scribble/manual - drscheme/acks + drracket/acks "private/utils.ss") @main-page['acks] diff --git a/collects/scribblings/main/private/search.js b/collects/scribblings/main/private/search.js index 632e0b24ee..4cd852abce 100644 --- a/collects/scribblings/main/private/search.js +++ b/collects/scribblings/main/private/search.js @@ -194,8 +194,8 @@ function InitializeSearch() { +'' +'' +MakeChevrons(1, diff --git a/collects/scribblings/tools/tool-lib-extracts.rkt b/collects/scribblings/tools/tool-lib-extracts.rkt index 2c8fce5fe7..ed091b609a 100644 --- a/collects/scribblings/tools/tool-lib-extracts.rkt +++ b/collects/scribblings/tools/tool-lib-extracts.rkt @@ -2,4 +2,4 @@ (require scribble/extract) -(provide-extracted (lib "tool-lib.rkt" "drscheme")) +(provide-extracted (lib "tool-lib.rkt" "drracket")) diff --git a/collects/scribblings/tools/tools.scrbl b/collects/scribblings/tools/tools.scrbl index c4495145c8..e5e4c9b050 100644 --- a/collects/scribblings/tools/tools.scrbl +++ b/collects/scribblings/tools/tools.scrbl @@ -2,11 +2,11 @@ @(begin (require scribble/manual (for-label scheme/gui/base) - (for-label drscheme/tool-lib) + (for-label drracket/tool-lib) (for-label scheme/unit scheme/contract scheme/class) (for-label scheme/base) (for-label framework/framework) - (for-label drscheme/syncheck-drracket-button)) + (for-label drracket/syncheck-drracket-button)) (define (File x) @tt[x]) (define (FileFirst x) @tt[x]) ;; indexing missing @@ -19,7 +19,7 @@ @author["Robert Bruce Findler"] -@(defmodule drscheme/tool-lib) +@defmodule*[(drracket/tool-lib drscheme/tool-lib)] This manual describes DrRacket's tools interface. It assumes familiarity with @@ -30,6 +30,10 @@ DrRacket, as described in and the Framework, as described in @(other-manual '(lib "scribblings/framework/framework.scrbl")). +The @racketmodname[drscheme/tool-lib] library is for backward +compatibility; it exports all of the bindings of +@racketmodname[drracket/tool-lib]. + @table-of-contents[] @bold{Thanks} @@ -163,7 +167,7 @@ then the same collection would be expected to contain a @File{tool.rkt} file. It might contain something like this: @schememod[ scheme/gui -(require drscheme/tool) +(require drracket/tool) (provide tool@) @@ -477,7 +481,7 @@ for a list of the capabilities registered by default. Check Syntax is a part of the DrRacket collection, but is implemented via the tools API. -@defmodule[drscheme/syncheck-drracket-button] +@defmodule[drracket/syncheck-drracket-button] @defthing[syncheck-drracket-button (list/c diff --git a/collects/tests/drscheme/drscheme-test-util.rkt b/collects/tests/drracket/drracket-test-util.rkt similarity index 100% rename from collects/tests/drscheme/drscheme-test-util.rkt rename to collects/tests/drracket/drracket-test-util.rkt diff --git a/collects/tests/drscheme/info.rkt b/collects/tests/drracket/info.rkt similarity index 100% rename from collects/tests/drscheme/info.rkt rename to collects/tests/drracket/info.rkt diff --git a/collects/tests/drscheme/io.rkt b/collects/tests/drracket/io.rkt similarity index 99% rename from collects/tests/drscheme/io.rkt rename to collects/tests/drracket/io.rkt index 8665a42459..88ba8da5d1 100644 --- a/collects/tests/drscheme/io.rkt +++ b/collects/tests/drracket/io.rkt @@ -12,7 +12,7 @@ add this test: |# -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" tests/utils/gui mzlib/class mzlib/pretty diff --git a/collects/tests/drscheme/language-test.rkt b/collects/tests/drracket/language-test.rkt similarity index 99% rename from collects/tests/drscheme/language-test.rkt rename to collects/tests/drracket/language-test.rkt index d49c06d1de..3a3ea329c1 100644 --- a/collects/tests/drscheme/language-test.rkt +++ b/collects/tests/drracket/language-test.rkt @@ -14,7 +14,7 @@ the settings above should match r5rs |# -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" tests/utils/gui mred framework @@ -86,7 +86,7 @@ the settings above should match r5rs (test-expression "true" "#t") (test-expression "mred^" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: mred^") (test-expression "(eq? 'a 'A)" "#f") - (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined identifier: x") + (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined variable: x") (test-expression "(define qqq 2) (set! qqq 1)" "") (test-expression "(cond [(= 1 2) 3])" "") (test-expression "(cons 1 2)" "(1 . 2)") @@ -186,7 +186,7 @@ the settings above should match r5rs (test-expression "true" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: true") (test-expression "mred^" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: mred^") (test-expression "(eq? 'a 'A)" "#t") - (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined identifier: x") + (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined variable: x") (test-expression "(define qqq 2) (set! qqq 1)" "") (test-expression "(cond ((= 1 2) 3))" "") (test-expression "(cons 1 2)" "(1 . 2)") @@ -938,7 +938,7 @@ the settings above should match r5rs "false") (test-expression "(set! x 1)" "x: name is not defined" - "set!: cannot set identifier before its definition: x") + "set!: cannot set variable before its definition: x") (test-expression "(define qqq 2) (set! qqq 1)" "(void)" "define: cannot redefine name: qqq\n(void)") diff --git a/collects/tests/drscheme/module-lang-test-utils.rkt b/collects/tests/drracket/module-lang-test-utils.rkt similarity index 97% rename from collects/tests/drscheme/module-lang-test-utils.rkt rename to collects/tests/drracket/module-lang-test-utils.rkt index 314be3b3b5..b12b5b0f70 100644 --- a/collects/tests/drscheme/module-lang-test-utils.rkt +++ b/collects/tests/drracket/module-lang-test-utils.rkt @@ -1,5 +1,5 @@ #lang scheme/gui -(require "drscheme-test-util.ss" mzlib/etc framework scheme/string) +(require "drracket-test-util.ss" mzlib/etc framework scheme/string) (provide test t rx run-test in-here write-test-modules) @@ -184,8 +184,8 @@ (equal? (regexp-replace* #rx"[\n\t ]+" a " ") (regexp-replace* #rx"[\n\t ]+" b " "))) - (define drs/compiled/et (build-path "compiled" "drscheme" "errortrace")) - (define drs/compiled (build-path "compiled" "drscheme")) + (define drs/compiled/et (build-path "compiled" "drracket" "errortrace")) + (define drs/compiled (build-path "compiled" "drracket")) (define compiled/et (build-path "compiled" "errortrace")) (define compiled (build-path "compiled")) diff --git a/collects/tests/drscheme/module-lang-test.rkt b/collects/tests/drracket/module-lang-test.rkt similarity index 99% rename from collects/tests/drscheme/module-lang-test.rkt rename to collects/tests/drracket/module-lang-test.rkt index 7b9dc8a5ee..7de75cd9a5 100644 --- a/collects/tests/drscheme/module-lang-test.rkt +++ b/collects/tests/drracket/module-lang-test.rkt @@ -260,5 +260,5 @@ "3") -(require "drscheme-test-util.ss") +(require "drracket-test-util.ss") (fire-up-drscheme-and-run-tests run-test) diff --git a/collects/tests/drscheme/randomly-click-language-dialog.rkt b/collects/tests/drracket/randomly-click-language-dialog.rkt similarity index 100% rename from collects/tests/drscheme/randomly-click-language-dialog.rkt rename to collects/tests/drracket/randomly-click-language-dialog.rkt diff --git a/collects/tests/drscheme/randomly-click-preferences.rkt b/collects/tests/drracket/randomly-click-preferences.rkt similarity index 100% rename from collects/tests/drscheme/randomly-click-preferences.rkt rename to collects/tests/drracket/randomly-click-preferences.rkt diff --git a/collects/tests/drscheme/randomly-click.rkt b/collects/tests/drracket/randomly-click.rkt similarity index 100% rename from collects/tests/drscheme/randomly-click.rkt rename to collects/tests/drracket/randomly-click.rkt diff --git a/collects/tests/drscheme/repl-test.rkt b/collects/tests/drracket/repl-test.rkt similarity index 99% rename from collects/tests/drscheme/repl-test.rkt rename to collects/tests/drracket/repl-test.rkt index 8e9e51cf92..ce1773ac04 100644 --- a/collects/tests/drscheme/repl-test.rkt +++ b/collects/tests/drracket/repl-test.rkt @@ -13,7 +13,7 @@ This produces an ACK message |# -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" mred framework) @@ -59,7 +59,7 @@ This produces an ACK message (string-append (regexp-quote "#symbol filename) toc)]) (if lookup (cdr lookup) diff --git a/collects/tests/drscheme/sample-solutions-testsuite-tp.scm b/collects/tests/drracket/sample-solutions-testsuite-tp.scm similarity index 100% rename from collects/tests/drscheme/sample-solutions-testsuite-tp.scm rename to collects/tests/drracket/sample-solutions-testsuite-tp.scm diff --git a/collects/tests/drscheme/save-teaching-lang-file.rkt b/collects/tests/drracket/save-teaching-lang-file.rkt similarity index 97% rename from collects/tests/drscheme/save-teaching-lang-file.rkt rename to collects/tests/drracket/save-teaching-lang-file.rkt index 65690a2ec8..d36d1b0f54 100644 --- a/collects/tests/drscheme/save-teaching-lang-file.rkt +++ b/collects/tests/drracket/save-teaching-lang-file.rkt @@ -5,7 +5,7 @@ framework/test framework/preferences) -(require tests/drscheme/drscheme-test-util) +(require tests/drracket/drracket-test-util) (fire-up-drscheme-and-run-tests (λ () diff --git a/collects/tests/drscheme/stepper-test.rkt b/collects/tests/drracket/stepper-test.rkt similarity index 99% rename from collects/tests/drscheme/stepper-test.rkt rename to collects/tests/drracket/stepper-test.rkt index 7a80f1aeda..fed2e55420 100644 --- a/collects/tests/drscheme/stepper-test.rkt +++ b/collects/tests/drracket/stepper-test.rkt @@ -2,7 +2,7 @@ (module stepper-test mzscheme (require mred mzlib/class - "drscheme-test-util.ss" + "drracket-test-util.ss" tests/utils/gui framework mzlib/pretty) diff --git a/collects/tests/drscheme/syncheck-test.rkt b/collects/tests/drracket/syncheck-test.rkt similarity index 99% rename from collects/tests/drscheme/syncheck-test.rkt rename to collects/tests/drracket/syncheck-test.rkt index 82b016b909..51387918c3 100644 --- a/collects/tests/drscheme/syncheck-test.rkt +++ b/collects/tests/drracket/syncheck-test.rkt @@ -7,7 +7,7 @@ trigger runtime errors in check syntax. |# #lang scheme/base - (require "drscheme-test-util.ss" + (require "drracket-test-util.ss" string-constants/string-constant tests/utils/gui scheme/path diff --git a/collects/tests/drscheme/teachpack.rkt b/collects/tests/drracket/teachpack.rkt similarity index 97% rename from collects/tests/drscheme/teachpack.rkt rename to collects/tests/drracket/teachpack.rkt index 57417db162..2bbf8a22b1 100644 --- a/collects/tests/drscheme/teachpack.rkt +++ b/collects/tests/drracket/teachpack.rkt @@ -1,6 +1,6 @@ #lang scheme/base -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" scheme/class scheme/path scheme/gui/base @@ -21,7 +21,7 @@ (let ([tp-names (let ([teachpack-path (normal-case-path (normalize-path - (collection-path "tests" "drscheme")))]) + (collection-path "tests" "drracket")))]) (let loop ([tp-exps tp-exps] [n 0]) (cond @@ -63,7 +63,7 @@ (let ([tp-name (normal-case-path (normalize-path (build-path - (collection-path "tests" "drscheme") + (collection-path "tests" "drracket") "teachpack-tmp.ss")))]) (call-with-output-file tp-name (lambda (port) (display tp-exp port)) @@ -93,7 +93,7 @@ (let ([tp-name (normal-case-path (normalize-path (build-path - (collection-path "tests" "drscheme") + (collection-path "tests" "drracket") "teachpack-tmp.ss")))]) (call-with-output-file tp-name (lambda (port) (display tp-exp port)) diff --git a/collects/tests/drscheme/time-keystrokes.rkt b/collects/tests/drracket/time-keystrokes.rkt similarity index 100% rename from collects/tests/drscheme/time-keystrokes.rkt rename to collects/tests/drracket/time-keystrokes.rkt diff --git a/collects/tests/info.rkt b/collects/tests/info.rkt index a7377f7216..53afb981fa 100644 --- a/collects/tests/info.rkt +++ b/collects/tests/info.rkt @@ -1,7 +1,7 @@ #lang setup/infotab (define name "Test Suites") -(define tools '(("time-keystrokes.ss" "drscheme"))) +(define tools '(("time-keystrokes.ss" "drracket"))) (define tool-names '("Time Keystrokes")) (define compile-omit-paths