(kill-buffer "*Messages*")
This is fine when fire up emacs each time, but if I change the .emacs
file when I am editing, and try to M-x load-file -> .emacs, I will get
an error message saying no such buffer, since the buffer has been
killed.
So, I want this..
;;pseudocode
(if ("*Message*" exit) (kill-buffer "*Messages*"))
does anyone know how to do this?
> ;;pseudocode
> (if ("*Message*" exit) (kill-buffer "*Messages*"))
>
> does anyone know how to do this?
You should write this:
(if (get-buffer "*Messages*") (kill-buffer "*Messages*"))
Also consider a `messages-buffer-max-lines` option in case you wish to
switch off logging.
--
Happy Hacking.
Dmitry Dzhus
http://sphinx.net.ru
む