diff --git a/collects/framework/framework.ss b/collects/framework/framework.ss index 774f694c..40bbdec2 100644 --- a/collects/framework/framework.ss +++ b/collects/framework/framework.ss @@ -212,6 +212,12 @@ "potentially marshalling some of the preferences." "" "Returns \\scm{\\#f} if saving the preferences fails and \\scm{\\#t} otherwise.") + (preferences:silent-save + (-> boolean?) + () + "Same as" + "@flink preferences:save" + "except that it does not put display a message if it fails.") (preferences:read (-> void?) () diff --git a/collects/framework/private/main.ss b/collects/framework/private/main.ss index cb5f966f..59f73b31 100644 --- a/collects/framework/private/main.ss +++ b/collects/framework/private/main.ss @@ -238,7 +238,9 @@ (exit:insert-on-callback (lambda () - (send (group:get-the-frame-group) on-close-all))) + (send (group:get-the-frame-group) on-close-all) + (preferences:silent-save) ;; the prefs may have changed as a result of closing the windows... + )) (exit:insert-can?-callback (lambda () diff --git a/collects/framework/private/preferences.ss b/collects/framework/private/preferences.ss index f9caafb7..84b2a69e 100644 --- a/collects/framework/private/preferences.ss +++ b/collects/framework/private/preferences.ss @@ -210,6 +210,7 @@ (define (save) (raw-save #f)) + (define (silent-save) (raw-save #f)) ;; raw-save : boolean -> boolean ;; input determines if there is a dialog box showing the errors (and other msgs) diff --git a/collects/framework/private/scheme.ss b/collects/framework/private/scheme.ss index 6f69f5ca..32fb9695 100644 --- a/collects/framework/private/scheme.ss +++ b/collects/framework/private/scheme.ss @@ -592,11 +592,14 @@ (define (tabify-all) (tabify-selection 0 (last-position))) (define (insert-return) + (printf "insert-return ~s\n" (tabify-on-return?)) (if (tabify-on-return?) (begin (begin-edit-sequence) (insert #\newline) + (printf "calling tabify\n") (tabify (get-start-position)) + (printf "called tabify\n") (set-position (let loop ([new-pos (get-start-position)]) (if (let ([next (get-character new-pos)]) @@ -1043,7 +1046,8 @@ (add-edit-function "tabify-at-caret" (lambda (x) (send x tabify-selection))) (add-edit-function "do-return" - (lambda (x) (send x insert-return))) + (lambda (x) + (send x insert-return))) (add-edit-function "comment-out" (lambda (x) (send x comment-out-selection))) (add-edit-function "box-comment-out" diff --git a/collects/framework/private/sig.ss b/collects/framework/private/sig.ss index e482da43..8b128737 100644 --- a/collects/framework/private/sig.ss +++ b/collects/framework/private/sig.ss @@ -182,6 +182,7 @@ set-un/marshall save + silent-save read restore-defaults diff --git a/collects/framework/private/text.ss b/collects/framework/private/text.ss index 144c31f1..62a588ac 100644 --- a/collects/framework/private/text.ss +++ b/collects/framework/private/text.ss @@ -963,6 +963,7 @@ WARNING: printf is rebound in the body of the unit to always (for-each (lambda (b) (channel-put read-chan b)) (bytes->list (string->bytes/utf-8 (string s/c))))])) snips/chars) + (channel-put read-chan (bytes-ref #"\n" 0)) (set! allow-tabify? #f) (super on-local-char key) (set! allow-tabify? #t)