From: Kim F. Storm Date: Tue, 19 Apr 2005 09:11:51 +0000 (+0000) Subject: (Symbol Plists): Add safe-get. X-Git-Tag: ttn-vms-21-2-B4~906 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=77aa896bce03d61369baebc1051a0403a4de5a2d;p=emacs.git (Symbol Plists): Add safe-get. Mention that `get' may signal an error. --- diff --git a/lispref/symbols.texi b/lispref/symbols.texi index 92c8b0f1e82..2c81cb9493c 100644 --- a/lispref/symbols.texi +++ b/lispref/symbols.texi @@ -496,6 +496,8 @@ This function finds the value of the property named @var{property} in @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 @@ using @code{eq}, so any object is a legitimate property. 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.