NextPrevUpTopContentsIndex

user-preference

Function
Summary

Gets or sets a persistent value in the user's registry.

Package

lispworks

Signature

user-preference path value-name &key product => value , valuep

Signature

(setf user-preference) value path value-name &key product => value

Arguments

path

A string or a list of strings.

value-name

A string.

product

A keyword.

Values

value

A Lisp object.

Description

The function user-preference returns 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 .

Note: while product can in principle be any Lisp object, values of product are compared by eq , so you should use keywords.

Note: The CAPI provides a way to store window geometry - see the entry for capi:top-level-interface-save-geometry-p . in the LispWorks CAPI Reference Manual .

Example
CL-USER 39 > (setf (user-preference "Things to Remember"
                                    "Ultimate Answer" 
                                    :product 
                                    :deep-thought) 
                   42)
42
 
CL-USER 40 > (user-preference "Things to Remember"
                              "Ultimate Answer"
                              :product
                              :deep-thought)
42
T
 
CL-USER 41 > (user-preference "Things to Remember"
                              "Ultimate Question" 
                              :product :deep-thought)
NIL
See also

product-registry-path


LispWorks Reference Manual - 23 Jul 2004

NextPrevUpTopContentsIndex