/[emacs]/emacs/lispref/symbols.texi
ViewVC logotype

Diff of /emacs/lispref/symbols.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17.8.5 by miles, Tue Jul 6 10:20:18 2004 UTC revision 1.17.8.6 by miles, Wed Dec 8 23:31:36 2004 UTC
# Line 528  that are stored in places other than sym Line 528  that are stored in places other than sym
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    

Legend:
Removed from v.1.17.8.5  
changed lines
  Added in v.1.17.8.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26