[jasspa] Bug in posted solution
- You may remember that Thomas Hundt asked how he could make the *scratch*
buffer have the document file type setup. The posted solution was to add the
following lines to his setup file.
add-file-hook "*scratch*" fhook-doc
!if &seq $buffer-bname "*scratch*"
1 delete-buffer "*foo*"
Unfortunately this has led to the discovery of a very nasty bug so if you are
using this then please read on, if not then please don't start.
The problem is that you must not delete the *scratch* buffer at start-up (the
bug has now been fixed and will be in the next release (coming soon I hope)).
As a work around I propose that you leave the *scratch* buffer alone and
create a new *doc-scratch* buffer (or *doc* buffer). To do this simply replace
the above with:
add-file-hook "*doc-scratch*" fhook-doc
This means that after start-up is complete there will always be a *scratch*
and a *doc-scratch* buffer. And if no files are specified on start-up the
current buffer will be *doc-scratch*, not *scratch*, fulfilling Thomas'
original requirement, I think.