look for default preferences file in the configuration directory
... instead of a "defaults" collection.
This commit is contained in:
parent
39dd0bb3be
commit
4a45d5faa0
|
@ -1088,9 +1088,9 @@ Extracts a preference value from the file designated by
|
|||
is provided and is not @racket[#f]. In the former case, if the
|
||||
preference file doesn't exist, @racket[get-preferences] attempts to
|
||||
read an @elemref["old-prefs"]{old preferences file}, and then a
|
||||
@filepath{racket-prefs.rktd} file in the @filepath{defaults}
|
||||
collection, instead. If none of those files exists, the preference set
|
||||
is empty.
|
||||
@filepath{racket-prefs.rktd} file in the configuration directory
|
||||
(as reported by @racket[find-config-dir]), instead. If none of those
|
||||
files exists, the preference set is empty.
|
||||
|
||||
The preference file should contain a list of symbol--value lists
|
||||
written with the default parameter settings. Keys
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
This directory hold defaults for the DrRacket preferences.
|
||||
For more information, search the documentation for "site-specific".
|
|
@ -1,5 +1,6 @@
|
|||
#lang racket/base
|
||||
(require "path.rkt"
|
||||
setup/dirs
|
||||
(for-syntax racket/base
|
||||
setup/path-to-relative))
|
||||
|
||||
|
@ -410,12 +411,14 @@
|
|||
(expand-user-path "~/.plt-scheme/plt-prefs.ss")])])
|
||||
(if (file-exists? alt-f)
|
||||
(values alt-f #f)
|
||||
;; Last chance: check for a "defaults" collection:
|
||||
;; (error here in case there's no "defaults"
|
||||
;; bails out through above `with-handlers')
|
||||
;; Last chance: check for a "racket-prefs.rtkd" file
|
||||
;; in the configuration directory:
|
||||
(values
|
||||
(collection-file-path "racket-prefs.rktd"
|
||||
"defaults")
|
||||
(let ([f (build-path (find-config-dir) "racket-prefs.rktd")])
|
||||
(if (file-exists? f)
|
||||
f
|
||||
;; Trigger a filesystem error:
|
||||
(call-with-input-file* f void)))
|
||||
#f))))))])
|
||||
(let ([prefs (with-pref-params
|
||||
(lambda ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user