From 6588449aed3016e210530b3e3449a124ff69d2a6 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 12 Aug 2012 16:20:21 -0500 Subject: [PATCH] enable online check syntax (change the default for the preferences and use a new preferences symbol, so everyone gets the new default) --- collects/drracket/private/main.rkt | 2 +- collects/drracket/private/module-language.rkt | 18 +++++++++--------- collects/tests/drracket/memory-log.rkt | 2 +- doc/release-notes/drracket/HISTORY.txt | 8 ++++++-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/collects/drracket/private/main.rkt b/collects/drracket/private/main.rkt index 3bbdcf148e..2acd26a7b8 100644 --- a/collects/drracket/private/main.rkt +++ b/collects/drracket/private/main.rkt @@ -503,7 +503,7 @@ lang (or settings (send lang default-settings))))))))) - (preferences:set-default 'drracket:online-compilation-default-off #f boolean?) + (preferences:set-default 'drracket:online-compilation-default-on #t boolean?) (preferences:set-default 'drracket:online-expansion:read-in-defs-errors 'corner (or/c 'margin 'gold 'corner)) diff --git a/collects/drracket/private/module-language.rkt b/collects/drracket/private/module-language.rkt index 683ce10775..b3c90d3777 100644 --- a/collects/drracket/private/module-language.rkt +++ b/collects/drracket/private/module-language.rkt @@ -1032,7 +1032,7 @@ (define tooltip-frame #f) (define/private (show-tooltip) (define tooltip-labels-to-show - (if (preferences:get 'drracket:online-compilation-default-off) + (if (preferences:get 'drracket:online-compilation-default-on) tooltip-labels (list (string-constant online-expansion-is-disabled)))) (cond @@ -1051,7 +1051,7 @@ (when tooltip-frame (cond [(or tooltip-labels - (not (preferences:get 'drracket:online-compilation-default-off))) + (not (preferences:get 'drracket:online-compilation-default-on))) (when (send tooltip-frame is-shown?) ;; just call this, as it updates the tooltip label already (show-tooltip))] @@ -1084,7 +1084,7 @@ (define colors-to-draw (cond [(not (in-module-language tlw)) #f] - [(preferences:get 'drracket:online-compilation-default-off) + [(preferences:get 'drracket:online-compilation-default-on) colors] [else (list "red")])) (when colors-to-draw @@ -1115,13 +1115,13 @@ (define cb-proc (λ (sym new-val) (set! colors #f) (refresh))) - (preferences:add-callback 'drracket:online-compilation-default-off cb-proc #t) + (preferences:add-callback 'drracket:online-compilation-default-on cb-proc #t) (define/override (on-event evt) (cond [(not (in-module-language tlw)) (void)] [(send evt button-down?) (define menu (new popup-menu%)) - (define on? (preferences:get 'drracket:online-compilation-default-off)) + (define on? (preferences:get 'drracket:online-compilation-default-on)) (new menu-item% [parent menu] [label (if on? @@ -1129,7 +1129,7 @@ "Enable online compilation")] [callback (λ args - (preferences:set 'drracket:online-compilation-default-off (not on?)))]) + (preferences:set 'drracket:online-compilation-default-on (not on?)))]) (popup-menu menu (send evt get-x) (send evt get-y))] [(send evt entering?) (show-tooltip)] @@ -1307,7 +1307,7 @@ (define cb-proc (λ (sym new-val) (when new-val (queue-callback (λ () (buffer-modified)))))) - (preferences:add-callback 'drracket:online-compilation-default-off cb-proc #t) + (preferences:add-callback 'drracket:online-compilation-default-on cb-proc #t) ;; buffer-modified and restart-place ;; are the two entry points that might @@ -1318,7 +1318,7 @@ ;; before doing anything (define/private (buffer-modified) - (when (and (preferences:get 'drracket:online-compilation-default-off) + (when (and (preferences:get 'drracket:online-compilation-default-on) (> (processor-count) 1)) (clear-old-error) (reset-frame-expand-error #t) @@ -1336,7 +1336,7 @@ (hide-module-language-error-panel)])))) (define/public (restart-place) - (when (and (preferences:get 'drracket:online-compilation-default-off) + (when (and (preferences:get 'drracket:online-compilation-default-on) (> (processor-count) 1)) (stop-place-running) (when compilation-out-of-date? diff --git a/collects/tests/drracket/memory-log.rkt b/collects/tests/drracket/memory-log.rkt index 295a11be32..9ed0285734 100644 --- a/collects/tests/drracket/memory-log.rkt +++ b/collects/tests/drracket/memory-log.rkt @@ -68,7 +68,7 @@ (not (send (send drs-frame get-definitions-text) syncheck:arrows-visible?)))) ; enable online check syntax and wait for the results to appear - (queue-callback/res (λ () (preferences:set 'drracket:online-compilation-default-off #t))) + (queue-callback/res (λ () (preferences:set 'drracket:online-compilation-default-on #t))) (poll-until (λ () (send (send drs-frame get-definitions-text) syncheck:arrows-visible?))) diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index 40b1a4a571..853190d704 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -2,8 +2,12 @@ Version 5.3.1 ------------------------------ - . Check Syntax now shows the blue boxes from the documentation in - the definitions window + . Enable online check syntax by default (it has been + available in the last two releases, but was disabled + by default) + + . Check Syntax now shows the blue boxes from the + documentation in the definitions window ------------------------------ Version 5.3