"Richard M. Stallman" <[EMAIL PROTECTED]> writes:

>     I often wondered why there are no hooks associated with switching
>     buffers, windows, and frames.
>
> These activities are too low level.  Certainly in the past it was not
> safe to run Lisp code for switching buffers, and maybe not for windows
> either.  Nowadays, since Lisp code can run during redisplay, maybe
> it would be safe.  But I do not like the idea.  Do you really want
> set-buffer to run Lisp code you don't know about?

I was not suggesting to do this at the low-level.

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.

-- 
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to