aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-04-19 08:34:19 +0000
committerKim F. Storm2005-04-19 08:34:19 +0000
commit7f2646c96c93d327dcd3bb69a44b45d34ee32e50 (patch)
treebe8b11204858ea6f32a58c6c961423a3d65249c5 /src
parentcd01ded928a8d082b9dbed6e9747c3d31b337b71 (diff)
downloademacs-7f2646c96c93d327dcd3bb69a44b45d34ee32e50.tar.gz
emacs-7f2646c96c93d327dcd3bb69a44b45d34ee32e50.zip
(Fsafe_get): New function.
(syms_of_fns): Defsubr it.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c13
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)'. */)
2051 return Fplist_get (XSYMBOL (symbol)->plist, propname); 2051 return Fplist_get (XSYMBOL (symbol)->plist, propname);
2052} 2052}
2053 2053
2054DEFUN ("safe-get", Fsafe_get, Ssafe_get, 2, 2, 0,
2055 doc: /* Return the value of SYMBOL's PROPNAME property.
2056This is the last value stored with `(put SYMBOL PROPNAME VALUE)'.
2057This function never signals an error. */)
2058 (symbol, propname)
2059 Lisp_Object symbol, propname;
2060{
2061 if (!SYMBOLP (symbol))
2062 return Qnil;
2063 return Fsafe_plist_get (XSYMBOL (symbol)->plist, propname);
2064}
2065
2054DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, 2066DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0,
2055 doc: /* Change value in PLIST of PROP to VAL. 2067 doc: /* Change value in PLIST of PROP to VAL.
2056PLIST is a property list, which is a list of the form 2068PLIST 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. */);
5792 defsubr (&Splist_get); 5804 defsubr (&Splist_get);
5793 defsubr (&Ssafe_plist_get); 5805 defsubr (&Ssafe_plist_get);
5794 defsubr (&Sget); 5806 defsubr (&Sget);
5807 defsubr (&Ssafe_get);
5795 defsubr (&Splist_put); 5808 defsubr (&Splist_put);
5796 defsubr (&Sput); 5809 defsubr (&Sput);
5797 defsubr (&Slax_plist_get); 5810 defsubr (&Slax_plist_get);