> Type > "x C-x z z z z C-x u" > (to insert an 'x', repeat the insert 4 times, then undo the last of the 4) > > Before the "C-x u" there were 5 'x's with the cursor after them all. > After the "C-x u" there are 4 'x's, as expected, but the cursor is on > the 2nd one, whereas I would expect it to be after the 4th one. > > If "C-x z" is used in full each time, instead of just hitting 'z' over > and over, then the undo works as expected. Could you please try the attached patch - against EMACS_22_BASE - and tell whether it does the right thing.