I (independently) wrote something called scrat.el that does essentially what Thi's suggested code does, but just a little different. (Its useful, but a little revision is pending to make it more useful.) Why blather about it? To show you that this is a pretty "universal" approach.
I don't have any "better suggestions" than tinkering with your code, but one additional suggestion is the trace mechanism, which can be a useful supplement to edebug. I've recently found it helpful to trace all the functions in a buffer (see trace-all.el). I guess this also implies the standard "break your functions up into smaller functions." _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs