aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorKim F. Storm2005-04-21 23:44:59 +0000
committerKim F. Storm2005-04-21 23:44:59 +0000
commit12ae7fc6114ff0ec87f33ec20c4c463bcaf70f83 (patch)
tree4567079ab7cecea3770848cacd341939fe9b208e /src/fns.c
parentd12168d677a284c1597853031c9a506dfb08e788 (diff)
downloademacs-12ae7fc6114ff0ec87f33ec20c4c463bcaf70f83.tar.gz
emacs-12ae7fc6114ff0ec87f33ec20c4c463bcaf70f83.zip
(Fplist_get): Replace by Fsafe_plist_get.
(Fsafe_plist_get): Rename to Fplist_get. (Fsafe_get): Remove, as Fget now uses safe Fplist_get. (defsubr): Remove defsubr for Fsafe_plist_get and Fsafe_get.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/fns.c b/src/fns.c
index bad4da80959..a22bad7dea0 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -186,8 +186,7 @@ To get the number of bytes, use `string-bytes'. */)
186 return val; 186 return val;
187} 187}
188 188
189/* This does not check for quits. That is safe 189/* This does not check for quits. That is safe since it must terminate. */
190 since it must terminate. */
191 190
192DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0, 191DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0,
193 doc: /* Return the length of a list, but avoid error or infinite loop. 192 doc: /* Return the length of a list, but avoid error or infinite loop.
@@ -1981,6 +1980,7 @@ merge (org_l1, org_l2, pred)
1981} 1980}
1982 1981
1983 1982
1983#if 0 /* Unsafe version. */
1984DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, 1984DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0,
1985 doc: /* Extract a value from a property list. 1985 doc: /* Extract a value from a property list.
1986PLIST is a property list, which is a list of the form 1986PLIST is a property list, which is a list of the form
@@ -2011,14 +2011,16 @@ one of the properties on the list. */)
2011 2011
2012 return Qnil; 2012 return Qnil;
2013} 2013}
2014#endif
2015
2016/* This does not check for quits. That is safe since it must terminate. */
2014 2017
2015DEFUN ("safe-plist-get", Fsafe_plist_get, Ssafe_plist_get, 2, 2, 0, 2018DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0,
2016 doc: /* Extract a value from a property list. 2019 doc: /* Extract a value from a property list.
2017PLIST is a property list, which is a list of the form 2020PLIST is a property list, which is a list of the form
2018\(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value 2021\(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value
2019corresponding to the given PROP, or nil if PROP is not 2022corresponding to the given PROP, or nil if PROP is not one of the
2020one of the properties on the list. 2023properties on the list. This function never signals an error. */)
2021This function never signals an error. */)
2022 (plist, prop) 2024 (plist, prop)
2023 Lisp_Object plist; 2025 Lisp_Object plist;
2024 Lisp_Object prop; 2026 Lisp_Object prop;
@@ -2051,18 +2053,6 @@ This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */)
2051 return Fplist_get (XSYMBOL (symbol)->plist, propname); 2053 return Fplist_get (XSYMBOL (symbol)->plist, propname);
2052} 2054}
2053 2055
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
2066DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, 2056DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0,
2067 doc: /* Change value in PLIST of PROP to VAL. 2057 doc: /* Change value in PLIST of PROP to VAL.
2068PLIST is a property list, which is a list of the form 2058PLIST is a property list, which is a list of the form
@@ -5811,9 +5801,7 @@ used if both `use-dialog-box' and this variable are non-nil. */);
5811 defsubr (&Sreverse); 5801 defsubr (&Sreverse);
5812 defsubr (&Ssort); 5802 defsubr (&Ssort);
5813 defsubr (&Splist_get); 5803 defsubr (&Splist_get);
5814 defsubr (&Ssafe_plist_get);
5815 defsubr (&Sget); 5804 defsubr (&Sget);
5816 defsubr (&Ssafe_get);
5817 defsubr (&Splist_put); 5805 defsubr (&Splist_put);
5818 defsubr (&Sput); 5806 defsubr (&Sput);
5819 defsubr (&Slax_plist_get); 5807 defsubr (&Slax_plist_get);