Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
442f927b
Commit
442f927b
authored
Nov 15, 2004
by
Kim F. Storm
Browse files
(Other Plists): Note that plist-get may signal error.
Add safe-plist-get.
parent
6d073ae1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
lispref/symbols.texi
lispref/symbols.texi
+19
-1
No files found.
lispref/symbols.texi
View file @
442f927b
...
...
@@ -528,11 +528,29 @@ that are stored in places other than symbols:
@defun plist-get plist property
This returns the value of the @var{property} property
stored in the property list @var{plist}. For example,
stored in the property list @var{plist}.
A @code{wrong-type-argument} error may be signaled if @var{plist} is
not a valid property list. For example,
@example
(plist-get '(foo 4) 'foo)
@result{} 4
(plist-get '(foo 4 bad) 'foo)
@result{} 4
(plist-get '(foo 4 bad) 'bar)
@result{} @code{wrong-type-argument} error
@end example
@end defun
@defun safe-plist-get plist property
This returns the value of the @var{property} property
stored in the property list @var{plist}. Unlike @code{plist-get}, it
accepts a malformed @var{plist} argument and always returns @code{nil}
if @var{property} is not found in the @var{plist}. For example,
@example
(safe-plist-get '(foo 4 bad) 'bar)
@result{} nil
@end example
@end defun
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment