gensym-sequential-name

Creates and returns a unique symbol in the specified package, based on
the printed representation of start-name. This is
useful for generating unique symbol names for objects.

Basically, gensym-sequential-name takes the
print name of start-name, removes any numerals
and hyphens from the end, optionally appends a hyphen, appends the
string representation of the lowest positive integer that has not yet
been used with the print name of start-name and
that causes the completed string to not name an existing symbol after
the string's case has been changed as appropriate for the *current-case-mode*, interns
the string in the specified package, and returns the resulting symbol.

start-name may be any object, but is typically a
symbol (which may have been created by gensym-sequential-name as well) or
a string.

If hyphenate is specified, then a hyphen is
appended before the number if and only if
hyphenate is true. If
hyphenate is not specified, then a hyphen is
appended if and only if there are any other hyphens in the base string
(after all numerals and hyphens have been removed from the end).

package may be either a package object or the
name of a package. The default value is :keyword.