diff options
| author | Kim F. Storm | 2005-04-19 09:11:51 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-04-19 09:11:51 +0000 |
| commit | 77aa896bce03d61369baebc1051a0403a4de5a2d (patch) | |
| tree | 5348c14b33447e474b8d6cb63680138a543b05e0 /lispref | |
| parent | f374520488d14e4403a9df52bc751de5e4ab8005 (diff) | |
| download | emacs-77aa896bce03d61369baebc1051a0403a4de5a2d.tar.gz emacs-77aa896bce03d61369baebc1051a0403a4de5a2d.zip | |
(Symbol Plists): Add safe-get.
Mention that `get' may signal an error.
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/symbols.texi | 8 |
1 files changed, 8 insertions, 0 deletions
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 | |||
| 496 | @var{symbol}'s property list. If there is no such property, @code{nil} | 496 | @var{symbol}'s property list. If there is no such property, @code{nil} |
| 497 | is returned. Thus, there is no distinction between a value of | 497 | is returned. Thus, there is no distinction between a value of |
| 498 | @code{nil} and the absence of the property. | 498 | @code{nil} and the absence of the property. |
| 499 | A @code{wrong-type-argument} error may be signaled if @var{symbol} | ||
| 500 | has a malformed property list. | ||
| 499 | 501 | ||
| 500 | The name @var{property} is compared with the existing property names | 502 | The name @var{property} is compared with the existing property names |
| 501 | using @code{eq}, so any object is a legitimate property. | 503 | using @code{eq}, so any object is a legitimate property. |
| @@ -503,6 +505,12 @@ using @code{eq}, so any object is a legitimate property. | |||
| 503 | See @code{put} for an example. | 505 | See @code{put} for an example. |
| 504 | @end defun | 506 | @end defun |
| 505 | 507 | ||
| 508 | @defun safe-get symbol property | ||
| 509 | This function finds the value of the property named @var{property} in | ||
| 510 | @var{symbol}'s property list. Unlike @code{get}, it just returns | ||
| 511 | @code{nil} if @var{symbol} has a malformed property list. | ||
| 512 | @end defun | ||
| 513 | |||
| 506 | @defun put symbol property value | 514 | @defun put symbol property value |
| 507 | This function puts @var{value} onto @var{symbol}'s property list under | 515 | This function puts @var{value} onto @var{symbol}'s property list under |
| 508 | the property name @var{property}, replacing any previous property value. | 516 | the property name @var{property}, replacing any previous property value. |