LispWorks provides an API for setting and querying persistent per-user settings in a platform-dependent registry.
On Microsoft Windows the preferences are stored in the HKEY_CURRENT_USER branch of the Windows registry. (LispWorks also offers a general Windows registry API, described in Accessing the Windows registry.)
On non-Windows the preferences are stored in subdirectories of the user's home directory.
To implement preferences for your LispWorks application, you will need to define a registry path using (setf product-registry-path)
and read it using
product-registry-path
.
Get and set preferences under the product path at run time with user-preference and
(setf user-preference)
.
(setf (sys:product-registry-path :deep-thought)
'("Software" "My Company" "Deep Thought"))
Store a preference for the current user:
(setf (user-preference "Answers"
"Ultimate Question"
:product :deep-thought)
42)
Retrieve a preference for the current user, potentially in a subsequent session:
(user-preference "Answers" "Ultimate Question"
:product :deep-thought)
LispWorks User Guide and Reference Manual - 20 Sep 2017