The generic function
replace-items
replaces some items in the
collection
collection
from
items
.
replace-items
can only be used when the collection has the default
items-get-function
svref
.
start should be a non-negative integer and less than the number of items in collection .
Items in
collection
are replaced starting at index
start
, and proceeding until the end of the list
items
, or the end of the items in
collection
. If
items
is too long, the surplus is quietly ignored.
replace-items
never alters the number of items in the collection.
If supplied,
new-selection
should be a list of items specifying the new selection in collection. To specify no selection, pass
nil
.
If
new-selection
is not supplied, then
replace-items
attempts to preserve the selection. If some of the selected items are replaced, then the selection on these items is removed, but if a selected item simply moves, then the selection moves with it.