528 |
|
|
529 |
@defun plist-get plist property |
@defun plist-get plist property |
530 |
This returns the value of the @var{property} property |
This returns the value of the @var{property} property |
531 |
stored in the property list @var{plist}. For example, |
stored in the property list @var{plist}. |
532 |
|
A @code{wrong-type-argument} error may be signaled if @var{plist} is |
533 |
|
not a valid property list. For example, |
534 |
|
|
535 |
@example |
@example |
536 |
(plist-get '(foo 4) 'foo) |
(plist-get '(foo 4) 'foo) |
537 |
@result{} 4 |
@result{} 4 |
538 |
|
(plist-get '(foo 4 bad) 'foo) |
539 |
|
@result{} 4 |
540 |
|
(plist-get '(foo 4 bad) 'bar) |
541 |
|
@result{} @code{wrong-type-argument} error |
542 |
|
@end example |
543 |
|
@end defun |
544 |
|
|
545 |
|
@defun safe-plist-get plist property |
546 |
|
This returns the value of the @var{property} property |
547 |
|
stored in the property list @var{plist}. Unlike @code{plist-get}, it |
548 |
|
accepts a malformed @var{plist} argument and always returns @code{nil} |
549 |
|
if @var{property} is not found in the @var{plist}. For example, |
550 |
|
|
551 |
|
@example |
552 |
|
(safe-plist-get '(foo 4 bad) 'bar) |
553 |
|
@result{} nil |
554 |
@end example |
@end example |
555 |
@end defun |
@end defun |
556 |
|
|