mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-20 18:17:20 +00:00
(Symbol Plists): Add safe-get.
Mention that `get' may signal an error.
This commit is contained in:
parent
f374520488
commit
77aa896bce
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user