From f5f5cf90aa9f5b65993c74e250511d2800d298a7 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 6 May 2009 03:42:49 +0000 Subject: [PATCH] old-preferences is gone (it was only there to convert old style preferences, and has been out for a long enough time) svn: r14726 original commit: 8ee902de48dd3f93a02f795765020187af0813bd --- collects/framework/preferences.ss | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/collects/framework/preferences.ss b/collects/framework/preferences.ss index 4bb7a341..abf616fe 100644 --- a/collects/framework/preferences.ss +++ b/collects/framework/preferences.ss @@ -41,16 +41,6 @@ the state transitions / contracts are: (define preferences:low-level-put-preferences (make-parameter put-preferences)) (define preferences:low-level-get-preference (make-parameter get-preference)) -(define old-preferences-symbol 'plt:framework-prefs) -;; reading is delayed, in case the low-level parameter is changed -(define old-preferences #f) -(define (init-old-preferences) - (unless old-preferences - (set! old-preferences (make-hasheq)) - (for ([line (in-list ((preferences:low-level-get-preference) - old-preferences-symbol (λ () '())))]) - (hash-set! old-preferences (car line) (cadr line))))) - (define (add-pref-prefix p) (string->symbol (format "plt:framework-pref:~a" p))) ;; preferences : hash-table[sym -o> any] @@ -102,20 +92,6 @@ the state transitions / contracts are: (add-pref-prefix p) (λ () (k (void))))]) (hash-set! preferences p (unmarshall-pref p marshalled))))) - ;; initialize old-preferences if needed - (init-old-preferences) - - ;; if there is no value in the preferences table, but there is one - ;; in the old version preferences file, take that: - (unless (hash-has-key? preferences p) - (when (hash-has-key? old-preferences p) - (hash-set! preferences p - (unmarshall-pref p (hash-ref old-preferences p))))) - - ;; clear the pref from the old table (just in case it was taking space -- we don't need it anymore) - (when (hash-has-key? old-preferences p) - (hash-remove! old-preferences p)) - ;; if it still isn't set, take the default value (unless (hash-has-key? preferences p) (hash-set! preferences p (default-value (hash-ref defaults p))))