# HG changeset patch # User Gerd Moellmann # Date 986829030 0 # Node ID c706f3e5efe024e758876d06c52eca349f2041ba # Parent 430eb00d1e9a757b646b688b7859cfe9f72e181e (Fplist_get, Fplist_put): Add QUITs. diff -r 430eb00d1e9a -r c706f3e5efe0 src/fns.c --- a/src/fns.c Mon Apr 09 14:52:45 2001 +0000 +++ b/src/fns.c Mon Apr 09 15:10:30 2001 +0000 @@ -1852,8 +1852,8 @@ tail = tem; } } + - DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, "Extract a value from a property list.\n\ PLIST is a property list, which is a list of the form\n\ @@ -1862,16 +1862,22 @@ one of the properties on the list.") (plist, prop) Lisp_Object plist; - register Lisp_Object prop; + Lisp_Object prop; { - register Lisp_Object tail; - for (tail = plist; !NILP (tail); tail = Fcdr (XCDR (tail))) + Lisp_Object tail; + + for (tail = plist; + CONSP (tail) && CONSP (XCDR (tail)); + tail = XCDR (XCDR (tail))) { - register Lisp_Object tem; - tem = Fcar (tail); - if (EQ (prop, tem)) - return Fcar (XCDR (tail)); + if (EQ (prop, XCAR (tail))) + return XCAR (XCDR (tail)); + QUIT; } + + if (!NILP (tail)) + wrong_type_argument (Qlistp, prop); + return Qnil; } @@ -1910,6 +1916,7 @@ return plist; } prev = tail; + QUIT; } newcell = Fcons (prop, Fcons (val, Qnil)); if (NILP (prev))