preferences:set-preference sets the preference symbol to value. This should be called when the users requests a change to a preference.
This function immediately writes the preference value to disk.
|(preferences:add-callback p f [weak?]) → (-> void?)|
|p : symbol?|
|f : (λ (x) (and (procedure? x) (procedure-arity-includes? x 2)))|
|weak? : boolean? = #f|
If weak? is true, the preferences system will only hold on to the callback weakly.
The callbacks will be called in the order in which they were added.
If you are adding a callback for a preference that requires marshalling and unmarshalling, you must set the marshalling and unmarshalling functions by calling preferences:set-un/marshall before adding a callback.
|(preferences:set-default symbol value test) → void?|
|symbol : symbol?|
|value : any/c|
|test : (any/c . -> . any)|
If you use preferences:set-un/marshall, you must call this function before calling it.
This sets the default value of the preference symbol to value. If the user has chosen a different setting, the user’s setting will take precedence over the default value.
|symbol : symbol?|
|marshall : (any/c . -> . printable/c)|
|unmarshall : (printable/c . -> . any/c)|
If the unmarshalling function returns a value that does not meet the guard passed to preferences:set-default for this preference, the default value is used.
The marshall function might be called with any value returned from read and it must not raise an error (although it can return arbitrary results if it gets bad input). This might happen when the preferences file becomes corrupted, or is edited by hand.
|message : string?|
|continuation-marks : continuation-mark-set?|
|→ ((listof symbol?) (listof any/c) . -> . any)|
|(preferences:low-level-put-preferences put-preferences) → void?|
|put-preferences : ((listof symbol?) (listof any/c) . -> . any)|
|→ (->* [symbol?] [(-> any)] any)|
|(preferences:low-level-get-preference get-preference) → void?|
|get-preference : (->* [symbol?] [(-> any)] any)|
See also preferences:restore-prefs-snapshot.