diff options
author | Kim F. Storm <storm@cua.dk> | 2005-04-19 08:34:19 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-04-19 08:34:19 +0000 |
commit | 128812179804d34fd4c1aa3627849b1d17458f14 (patch) | |
tree | a2495f24d35a9f8e1725c12ae45932c6721b931c /src/fns.c | |
parent | 2b82864a8bf8558b63296fcac916940d61294e0e (diff) | |
download | emacs-128812179804d34fd4c1aa3627849b1d17458f14.tar.gz |
(Fsafe_get): New function.
(syms_of_fns): Defsubr it.
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/fns.c b/src/fns.c index daa9e10c465..088b6ca500d 100644 --- a/src/fns.c +++ b/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); |