Deleting a unique plist from a list of plists



I looped through a list of records (plists actually), displaying them
one at a time. When one needed to be deleted, I intended to use

(push record *records-to-remove*)

to populate *records-to-remove*. However, no records needed to be
removed. Nevertheless, once the loop was finished the following code
automatically ran:

(setf *db* (dolist (record-to-remove *records-to-remove*)
(remove record-to-remove *db* :test #'equal)))

to delete any unwanted records. Since *records-to-remove* was empty, no
records should have been removed. To my surprise this deleted every
record in *db*. Studying CLHS, it seems that for several reasons 'remove
is not going to do what is needed. In fact, can #'equal even be used to
test for a unique plist in a list of plists? I don't understand why any
records were deleted at all.

I had a backup, so no big loss. But I haven't been able to figure out
how to do what needs to be done to make this work properly. Any help
will be appreciated.

--
drlat

.