emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adieu *scratch*


From: Juanma Barranquero
Subject: Re: adieu *scratch*
Date: Wed, 20 Dec 2006 15:06:51 +0100

On 12/20/06, Dieter Wilhelm <address@hidden> wrote:

It seems that *scratch* is not necessary any longer (in 22) but I wish
there were a command for re-creating it

I use a variant of the following in my .emacs:

(defun switch-to-scratch ()
  (interactive)
  (let ((exists (get-buffer "*scratch*")))
    (switch-to-buffer "*scratch*")
    (unless exists
      (unless (eq major-mode initial-major-mode)
        (funcall (or initial-major-mode
                     'lisp-interaction-mode)))
      (setq buffer-offer-save t))))

or at least a mechanism not to kill it incidentally.

I use Noah Friedman's protbuf.el
(http://www.emacswiki.org/cgi-bin/wiki/ProtectingBuffers), and I even
have an advice around bs-delete so if I delete .emacs.el from inside
bs-show it is automatically recreated.

                   /L/e/k/t/u




reply via email to

[Prev in Thread] Current Thread [Next in Thread]