LispWorks CAPI Reference Manual > 1 CAPI Reference Entries

NextPrevUpTopContentsIndex

replace-items

Generic Function
Summary

Replaces some items in a collection.

Package

capi

Signature

replace-items collection items &key start new-selection

Arguments

collection

A collection.

items

A list.

start

A non-negative integer.

new-selection

A list specifying the selection.

Description

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.

See also

append-items
collection
remove-items


LispWorks CAPI Reference Manual - 21 Dec 2009

NextPrevUpTopContentsIndex