From b6d3c63636a5b1219eeb4c277f658122e4769b30 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 12 Oct 2004 16:55:46 +0000 Subject: [PATCH] . original commit: 15358e2a435792df8af70d7cfd72009ca9e613dc --- collects/framework/private/editor.ss | 17 +++++++++-------- collects/framework/private/keymap.ss | 9 +++++++-- collects/framework/private/scheme.ss | 7 ++++--- collects/framework/private/text.ss | 16 +++++++++------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/collects/framework/private/editor.ss b/collects/framework/private/editor.ss index 3bd458aa..969bc2a4 100644 --- a/collects/framework/private/editor.ss +++ b/collects/framework/private/editor.ss @@ -304,15 +304,16 @@ (send standard-style-list new-named-style "Standard" (send standard-style-list find-or-create-style (send standard-style-list find-named-style "Basic") - delta)))) - - (let ([style (send standard-style-list find-named-style default-color-style-name)]) - (if style - (send style set-delta delta) - (send standard-style-list new-named-style default-color-style-name - (send standard-style-list find-or-create-style - (send standard-style-list find-named-style "Standard") delta))))) + + (let ([delta (make-object style-delta%)] + [style (send standard-style-list find-named-style default-color-style-name)]) + (if style + (send style set-delta delta) + (send standard-style-list new-named-style default-color-style-name + (send standard-style-list find-or-create-style + (send standard-style-list find-named-style "Standard") + delta)))) (define (set-default-font-color color) (let* ([scheme-standard (send standard-style-list find-named-style default-color-style-name)] diff --git a/collects/framework/private/keymap.ss b/collects/framework/private/keymap.ss index e82f86a2..767adbf9 100644 --- a/collects/framework/private/keymap.ss +++ b/collects/framework/private/keymap.ss @@ -218,8 +218,13 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define (make-meta-prefix-list key) - (list (string-append "m:" key) - (string-append "ESC;" key))) + (let ([defaults + (list (string-append "m:" key) + (string-append "ESC;" key))]) + (if (eq? (system-type) 'macosx) + (cons (string-append "a:" key) + defaults) + defaults))) (define send-map-function-meta (lambda (keymap key func) diff --git a/collects/framework/private/scheme.ss b/collects/framework/private/scheme.ss index 97e5b093..bef2de26 100644 --- a/collects/framework/private/scheme.ss +++ b/collects/framework/private/scheme.ss @@ -876,6 +876,7 @@ [define select-up-sexp (lambda () (select-text (lambda (x) (find-up-sexp x)) #f))] [define select-down-sexp (lambda () (select-text (lambda (x) (find-down-sexp x)) #t))] + (inherit get-fixed-style) (define (mark-matching-parenthesis pos) (let ([open-parens (map car (scheme-paren:get-paren-pairs))] [close-parens (map cdr (scheme-paren:get-paren-pairs))]) @@ -888,9 +889,9 @@ (cond [(and (eq? matching-parenthesis-style start-style) (eq? matching-parenthesis-style end-style)) - (let ([standard-style (send (get-style-list) find-named-style "Standard")]) - (change-style standard-style pos (+ pos 1)) - (change-style standard-style (- end 1) end))] + (let ([fixed-style (get-fixed-style)]) + (change-style fixed-style pos (+ pos 1)) + (change-style fixed-style (- end 1) end))] [else (change-style matching-parenthesis-style pos (+ pos 1)) (change-style matching-parenthesis-style (- end 1) end)]))))))) diff --git a/collects/framework/private/text.ss b/collects/framework/private/text.ss index 2cde3dac..7befa6d2 100644 --- a/collects/framework/private/text.ss +++ b/collects/framework/private/text.ss @@ -327,13 +327,13 @@ WARNING: printf is rebound in the body of the unit to always (define (set-styles-fixed b) (set! styles-fixed? b)) (define/augment (on-insert start len) - (inner (void) on-insert start len) - (begin-edit-sequence)) + (begin-edit-sequence) + (inner (void) on-insert start len)) (define/augment (after-insert start len) (when styles-fixed? (change-style (get-fixed-style) start (+ start len) #f)) - (end-edit-sequence) - (inner (void) after-insert start len)) + (inner (void) after-insert start len) + (end-edit-sequence)) (public move/copy-to-edit) (define (move/copy-to-edit dest-edit start end dest-position) @@ -367,9 +367,11 @@ WARNING: printf is rebound in the body of the unit to always (define foreground-color-mixin (mixin (basic<%> editor:standard-style-list<%>) (foreground-color<%>) - (inherit begin-edit-sequence end-edit-sequence change-style) - (define/override (get-fixed-style) - (send (editor:get-standard-style-list) find-named-style (editor:get-default-color-style-name))) + (inherit begin-edit-sequence end-edit-sequence change-style get-style-list) + (define/override (get-fixed-style) + (send (editor:get-standard-style-list) + find-named-style + (editor:get-default-color-style-name))) (super-new))) (define hide-caret/selection<%> (interface (basic<%>)))