Stefan Monnier writes: >> 1) undo-auto--undoably-changed-buffers becomes an alist > >> ((0 . (buffers*)) >> (1 . (buffers*)) >> (2 . (buffers*))) > >> where the key is the return of (recursion-depth) > >> 2) undo-auto--boundaries operates only on buffers at the >> current-recursion-depth. Or, probably, at the current of greater >> recursion depth, to ensure that undo-buffers happens when a recursive >> edit exits. > > Hmm... sounds pretty good, and I think you can do it more simply: > just let-bind undo-auto--undoably-changed-buffers to nil when entering > a recursive edit. Tried it before I got your mail. Seems to function. Simple let binding would not give quite the same functionality, because of the last part -- I also add a boundary to buffers with a greater recursive depth; with a let binding, I think these would be unbound for commands that lower the recursion depth.