undo-make-selective-list

undo-make-selective-list is a compiled Lisp function in `simple.el'.

(undo-make-selective-list START END)

Return a list of undo elements for the region START to END.
The elements come from `buffer-undo-list', but we keep only the
elements inside this region, and discard those outside this
region. The elements' positions are adjusted so as the returned
list can be applied to the current buffer.