mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
(Fsafe_get): New function.
(syms_of_fns): Defsubr it.
This commit is contained in:
parent
cd01ded928
commit
7f2646c96c
1 changed files with 13 additions and 0 deletions
13
src/fns.c
13
src/fns.c
|
|
@ -2051,6 +2051,18 @@ This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */)
|
|||
return Fplist_get (XSYMBOL (symbol)->plist, propname);
|
||||
}
|
||||
|
||||
DEFUN ("safe-get", Fsafe_get, Ssafe_get, 2, 2, 0,
|
||||
doc: /* Return the value of SYMBOL's PROPNAME property.
|
||||
This is the last value stored with `(put SYMBOL PROPNAME VALUE)'.
|
||||
This function never signals an error. */)
|
||||
(symbol, propname)
|
||||
Lisp_Object symbol, propname;
|
||||
{
|
||||
if (!SYMBOLP (symbol))
|
||||
return Qnil;
|
||||
return Fsafe_plist_get (XSYMBOL (symbol)->plist, propname);
|
||||
}
|
||||
|
||||
DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0,
|
||||
doc: /* Change value in PLIST of PROP to VAL.
|
||||
PLIST is a property list, which is a list of the form
|
||||
|
|
@ -5792,6 +5804,7 @@ used if both `use-dialog-box' and this variable are non-nil. */);
|
|||
defsubr (&Splist_get);
|
||||
defsubr (&Ssafe_plist_get);
|
||||
defsubr (&Sget);
|
||||
defsubr (&Ssafe_get);
|
||||
defsubr (&Splist_put);
|
||||
defsubr (&Sput);
|
||||
defsubr (&Slax_plist_get);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue