The text widget does not have a built-in core undo functionality, but it
is possible to create such in Tcl. The method is similar to maintaining
read-only sections of a text widget, whereby the programmer must catch
every instance of insert and delete and store them.
Depending on whether you want unlimited undo, you also want redo, or you
want to capture tags as well, the exact functionality changes. Examples
of working undo functionality have been posted on news:comp.lang.tcl and
can be found via http://www.deja.com/.