I would like to run a custom function whenever a new *Scratch*
buffer is created because the last uninteresting buffer was killed. I looked at both the C source code and window.el
and it appears that Lisp
has nothing to do with the *Scratch*
buffer being displayed in a particular window, but I'm not 100% certain. It appears as though tem = Fother_buffer (buffer, Qnil, Qnil)
within kill-buffer
is what leads to the creation of a new *Scratch*
buffer.
Is there anything other than the buffer-list-update-hook
that I could use to trigger my custom function when a new *Scratch*
gets spawned? I don't think that replace-buffer-in-windows
is any help in this context.
[I don't really want to advise get-buffer-create
.]