diff --git a/collects/framework/private/autosave.ss b/collects/framework/private/autosave.ss index 1de497d8..b7ca3288 100644 --- a/collects/framework/private/autosave.ss +++ b/collects/framework/private/autosave.ss @@ -2,7 +2,7 @@ #lang scheme/unit (require (lib "class.ss") - (lib "file.ss") + scheme/file "sig.ss" "../gui-utils.ss" "../preferences.ss" diff --git a/collects/framework/private/editor.ss b/collects/framework/private/editor.ss index 509e8afe..aad7d6b9 100644 --- a/collects/framework/private/editor.ss +++ b/collects/framework/private/editor.ss @@ -7,7 +7,7 @@ "../gui-utils.ss" (lib "etc.ss") (lib "mred-sig.ss" "mred") - (lib "file.ss")) + scheme/file) (import mred^ [prefix autosave: framework:autosave^] diff --git a/collects/framework/private/finder.ss b/collects/framework/private/finder.ss index 1ed3aedf..801fc818 100644 --- a/collects/framework/private/finder.ss +++ b/collects/framework/private/finder.ss @@ -5,7 +5,7 @@ "../preferences.ss" (lib "mred-sig.ss" "mred") (lib "string.ss") - (lib "file.ss") + scheme/file (lib "etc.ss")) diff --git a/collects/framework/private/frame.ss b/collects/framework/private/frame.ss index 3fd0da05..4763a0f7 100644 --- a/collects/framework/private/frame.ss +++ b/collects/framework/private/frame.ss @@ -8,7 +8,7 @@ "bday.ss" (lib "mred-sig.ss" "mred") (lib "list.ss") - (lib "file.ss") + scheme/file (lib "etc.ss")) (import mred^ @@ -310,7 +310,7 @@ (define-struct status-line (id count)) ;; status-line-msg : (make-status-line-msg (is-a?/c message%) (union symbol #f)) - (define-struct status-line-msg (message id)) + (define-struct status-line-msg (message [id #:mutable])) (define status-line-mixin (mixin (basic<%>) (status-line<%>) diff --git a/collects/framework/private/group.ss b/collects/framework/private/group.ss index bcf5ea70..1d0adab4 100644 --- a/collects/framework/private/group.ss +++ b/collects/framework/private/group.ss @@ -7,7 +7,7 @@ "../gui-utils.ss" (lib "mred-sig.ss" "mred") (lib "list.ss") - (lib "file.ss")) + scheme/file) (import mred^ [prefix application: framework:application^] diff --git a/collects/framework/private/handler.ss b/collects/framework/private/handler.ss index f9d1cc1b..c4eed5ad 100644 --- a/collects/framework/private/handler.ss +++ b/collects/framework/private/handler.ss @@ -7,7 +7,7 @@ "../preferences.ss" "../gui-utils.ss" (lib "mred-sig.ss" "mred") - (lib "file.ss") + scheme/file (lib "string-constant.ss" "string-constants")) diff --git a/collects/framework/private/icon.ss b/collects/framework/private/icon.ss index 718f8e5f..ee2f62bd 100644 --- a/collects/framework/private/icon.ss +++ b/collects/framework/private/icon.ss @@ -1,5 +1,6 @@ #lang scheme/unit - (require (lib "class.ss") + (require (for-syntax scheme/base) + (lib "class.ss") (lib "include-bitmap.ss" "mrlib") "bday.ss" "sig.ss" diff --git a/collects/framework/private/keymap.ss b/collects/framework/private/keymap.ss index 4d0a7ec7..d93b097b 100644 --- a/collects/framework/private/keymap.ss +++ b/collects/framework/private/keymap.ss @@ -511,7 +511,7 @@ (λ (edit event) (let ([sel-start (send edit get-start-position)] [sel-end (send edit get-end-position)]) - (if (= sel-start sel-end) + (when (= sel-start sel-end) (send* edit (insert #\newline) (set-position sel-start)))))] @@ -729,7 +729,7 @@ (get-text-from-user (string-constant goto-position) (string-constant goto-position))))]) - (if (string? num-str) + (when (string? num-str) (let ([pos (string->number num-str)]) (when pos (send edit set-position (sub1 pos)))))) diff --git a/collects/framework/private/panel.ss b/collects/framework/private/panel.ss index 8d8e4dbd..674fa32d 100644 --- a/collects/framework/private/panel.ss +++ b/collects/framework/private/panel.ss @@ -164,7 +164,7 @@ (define-struct gap (before before-dim before-percentage after after-dim after-percentage)) ;; type percentage : (make-percentage number) - (define-struct percentage (%)) + (define-struct percentage (%) #:mutable) (define dragable<%> (interface (window<%> area-container<%>) diff --git a/collects/framework/private/preferences.ss b/collects/framework/private/preferences.ss index 1a8a9595..2c65d982 100644 --- a/collects/framework/private/preferences.ss +++ b/collects/framework/private/preferences.ss @@ -30,7 +30,7 @@ the state transitions / contracts are: (require (lib "string-constant.ss" "string-constants") (lib "class.ss") - (lib "file.ss") + scheme/file "sig.ss" "../gui-utils.ss" "../preferences.ss" @@ -117,7 +117,7 @@ the state transitions / contracts are: ;; (make-ppanel-interior string (union #f panel) (listof panel-tree))) (define-struct ppanel (name panel)) (define-struct (ppanel-leaf ppanel) (maker)) - (define-struct (ppanel-interior ppanel) (children)) + (define-struct (ppanel-interior ppanel) (children) #:mutable) ;; ppanels : (listof ppanel-tree) (define ppanels null) diff --git a/collects/framework/private/scheme.ss b/collects/framework/private/scheme.ss index c2a6457d..15b5a506 100644 --- a/collects/framework/private/scheme.ss +++ b/collects/framework/private/scheme.ss @@ -75,7 +75,7 @@ (send text last-position) (send text last-position))) saved-snips) - (datum->syntax-object + (datum->syntax #f (read (open-input-text-editor text)) (list file line col pos 1)))) @@ -551,10 +551,10 @@ [get-proc (λ () (let ([id-end (get-forward-sexp contains)]) - (if (and id-end (> id-end contains)) - (let* ([text (get-text contains id-end)]) - (or (get-keyword-type text tabify-prefs) - 'other)))))] + (and (and id-end (> id-end contains)) + (let* ([text (get-text contains id-end)]) + (or (get-keyword-type text tabify-prefs) + 'other)))))] [procedure-indent (λ () (case (get-proc) @@ -715,7 +715,7 @@ (let* ([first-para (position-paragraph start-pos)] [last-para (calc-last-para end-pos)]) (let para-loop ([curr-para first-para]) - (if (<= curr-para last-para) + (when (<= curr-para last-para) (let ([first-on-para (paragraph-start-position curr-para)]) (insert #\; first-on-para) (para-loop (add1 curr-para)))))) @@ -964,8 +964,8 @@ [first-char (get-character pos)] [paren? (or (char=? first-char #\( ) (char=? first-char #\[ ))] - [closer (if paren? - (get-forward-sexp pos))]) + [closer (and paren? + (get-forward-sexp pos))]) (if (and paren? closer) (begin (begin-edit-sequence) (delete pos (add1 pos)) diff --git a/collects/framework/private/sig.ss b/collects/framework/private/sig.ss index 1c112d9b..e77818c3 100644 --- a/collects/framework/private/sig.ss +++ b/collects/framework/private/sig.ss @@ -1,7 +1,7 @@ -(module sig mzscheme - (require (lib "unit.ss")) +(module sig scheme/base + (require scheme/unit) - (provide (prefix-all-defined-except framework: framework^) + (provide (prefix-out framework: (except-out (all-defined-out) framework^)) framework^) (define-signature number-snip-class^ diff --git a/collects/framework/private/text.ss b/collects/framework/private/text.ss index 98b22993..f9eee045 100644 --- a/collects/framework/private/text.ss +++ b/collects/framework/private/text.ss @@ -18,7 +18,7 @@ WARNING: printf is rebound in the body of the unit to always (lib "etc.ss") (lib "dirs.ss" "setup") (lib "string.ss") - (prefix srfi1: (lib "1.ss" "srfi"))) + (prefix-in srfi1: (lib "1.ss" "srfi"))) (import mred^ [prefix icon: framework:icon^] @@ -954,7 +954,7 @@ WARNING: printf is rebound in the body of the unit to always get-box-input-editor-snip% get-box-input-text%)) - (define-struct peeker (bytes skip-count pe resp-chan nack polling?) (make-inspector)) + (define-struct peeker (bytes skip-count pe resp-chan nack polling?) #:inspector (make-inspector)) (define-struct committer (kr commit-peeker-evt done-evt resp-chan resp-nack)) (define msec-timeout 500) @@ -1989,7 +1989,7 @@ WARNING: printf is rebound in the body of the unit to always ;; ;; queues ;; - (define-struct queue (front back count)) + (define-struct queue (front back count) #:mutable) (define (empty-queue) (make-queue '() '() 0)) (define (enqueue e q) (make-queue (cons e (queue-front q))