Is there an emacs lisp function that will allow me to tell if a buffer is out of focus?
I am trying to write a hook that will get rid of the semantics *possible co
You can test if a buffer is the buffer that currently has focus with current-buffer
. For example, to test if *scratch*
has the focus,
(eq
(current-buffer)
(get-buffer "*scratch*"))
The *Messages*
buffer is an important part of emacs. It's the implicit target of the message
function that is used to log various bits of information from all over. You can kill *Messages*
like any other buffer, but it will just get recreated the next time something calls message
. You could probably silence it by redefining the message
function, but I'd question the point of doing so.