diff options
| author | Kim F. Storm | 2005-04-19 08:34:19 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-04-19 08:34:19 +0000 |
| commit | 7f2646c96c93d327dcd3bb69a44b45d34ee32e50 (patch) | |
| tree | be8b11204858ea6f32a58c6c961423a3d65249c5 /src/fns.c | |
| parent | cd01ded928a8d082b9dbed6e9747c3d31b337b71 (diff) | |
| download | emacs-7f2646c96c93d327dcd3bb69a44b45d34ee32e50.tar.gz emacs-7f2646c96c93d327dcd3bb69a44b45d34ee32e50.zip | |
(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
| @@ -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 | ||
| 2054 | DEFUN ("safe-get", Fsafe_get, Ssafe_get, 2, 2, 0, | ||
| 2055 | doc: /* Return the value of SYMBOL's PROPNAME property. | ||
| 2056 | This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. | ||
| 2057 | This 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 | |||
| 2054 | DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, | 2066 | DEFUN ("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. |
| 2056 | PLIST is a property list, which is a list of the form | 2068 | 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. */); | |||
| 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); |