ring-remove+insert+extend

ring-remove+insert+extend is a compiled Lisp function in `ring.el'.

(ring-remove+insert+extend RING ITEM &optional GROW-P)

`ring-remove' ITEM from RING, then `ring-insert+extend' it.
This ensures that there is only one ITEM on RING.

If the RING is full, behavior depends on GROW-P:
If GROW-P is non-nil, enlarge the ring to accommodate the new ITEM.
If GROW-P is nil, dump the oldest item to make room for the new.