Rather I would do it in the top-level command loop, e.g. by saving the current window/buffer/frame before running the pre-command hook and compare them to the value after running the post-command-hook -- and run the appropriate hooks at that time.
That way, e.g. set-buffer on its own won't run any unknown Lisp code. I think it would be extremely confusing if switching windows to look around in another buffer were likely to run some Lisp code. It would make debugging very painful, if you could not look at buffers without changing them. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel