From: Stefan Monnier Date: Mon, 29 Apr 2002 19:29:58 +0000 (+0000) Subject: (remove_properties): Don't use XCAR without CONSP. X-Git-Tag: ttn-vms-21-2-B4~15309 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b079118d839503d4238ccb15ba54df43c5a1d4e4;p=emacs.git (remove_properties): Don't use XCAR without CONSP. --- diff --git a/src/textprop.c b/src/textprop.c index c85b4dcfd04..401e26f1a30 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -463,12 +463,12 @@ remove_properties (plist, list, i, object) tail1 = list, use_plist = 0; /* Go through each element of LIST or PLIST. */ - while (! NILP (tail1)) + while (CONSP (tail1)) { sym = XCAR (tail1); /* First, remove the symbol if it's at the head of the list */ - while (! NILP (current_plist) && EQ (sym, XCAR (current_plist))) + while (CONSP (current_plist) && EQ (sym, XCAR (current_plist))) { if (BUFFERP (object)) record_property_change (i->position, LENGTH (i), @@ -485,7 +485,7 @@ remove_properties (plist, list, i, object) { register Lisp_Object this; this = XCDR (XCDR (tail2)); - if (EQ (sym, XCAR (this))) + if (CONSP (this) && EQ (sym, XCAR (this))) { if (BUFFERP (object)) record_property_change (i->position, LENGTH (i),