Mercurial > emacs
changeset 61648:d1980873b722
(Symbol Plists): Add safe-get.
Mention that `get' may signal an error.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 19 Apr 2005 09:11:51 +0000 |
parents | a39c60b30e5a |
children | 07fac5b8e9dc |
files | lispref/symbols.texi |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/symbols.texi Tue Apr 19 08:34:50 2005 +0000 +++ b/lispref/symbols.texi Tue Apr 19 09:11:51 2005 +0000 @@ -496,6 +496,8 @@ @var{symbol}'s property list. If there is no such property, @code{nil} is returned. Thus, there is no distinction between a value of @code{nil} and the absence of the property. +A @code{wrong-type-argument} error may be signaled if @var{symbol} +has a malformed property list. The name @var{property} is compared with the existing property names using @code{eq}, so any object is a legitimate property. @@ -503,6 +505,12 @@ See @code{put} for an example. @end defun +@defun safe-get symbol property +This function finds the value of the property named @var{property} in +@var{symbol}'s property list. Unlike @code{get}, it just returns +@code{nil} if @var{symbol} has a malformed property list. +@end defun + @defun put symbol property value This function puts @var{value} onto @var{symbol}'s property list under the property name @var{property}, replacing any previous property value.