A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw71/LW/html/lw-847.htm below:

user-preference

Description

The function user-preference reads the value of the registry entry value-name under path under the registry path defined for product by (setf product-registry-path). If the registry entry was found a second value t is returned. If the registry entry was not found, then value is nil.

The function (setf user-preference) sets the value of that registry entry to value.

If path is a list of strings, then it is interpreted like the directory component of a pathname. If path is a string, then any directory separators should be appropriate for the platform - that is, use backslash on Windows, and forward slash on non-Windows systems.

Example

This example is on Microsoft Windows. Note the use of backslashes as directory separators in the path argument:

(setf (user-preference "My Stuff\\FAQ"
                       "Ultimate Answer" 
                       :product :deep-thought) 
      42)
=>
42

This is equivalent to the previous example, and is portable because we avoid the explicit directory separators in the path argument:

(setf (user-preference (list "My Stuff" "FAQ")
                       "Ultimate Answer"
                       :product :deep-thought) 
      42)
=>
42

We can retrieve values on Windows like this:

(user-preference "My Stuff\\FAQ"
                 "Ultimate Answer"
                 :product :deep-thought)
=>
42
t

We can retrieve values on any platform like this:

(user-preference (list "My Stuff" "FAQ")
                 "Ultimate Question"
                 :product :deep-thought)
=>
nil
nil

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4