Loading ...
Sorry, an error occurred while loading the content.

[jasspa] Bug in posted solution

Expand Messages
  • bill@jasspa.freeserve.co.uk
    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
    Message 1 of 1 , Sep 12, 1999
    • 0 Attachment
      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*"
      change-buffer-name "*foo*"
      1 delete-buffer "*foo*"
      !endif

      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
      find-buffer "*doc-scratch*"

      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.

      Steve
    Your message has been successfully submitted and would be delivered to recipients shortly.