[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: where is the scratch buffer
From: |
Thien-Thi Nguyen |
Subject: |
Re: where is the scratch buffer |
Date: |
Fri, 31 Mar 2006 16:44:26 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Malte Spiess <mail@malte-spiess.de> writes:
> But if you type in *scratch* there will be a new one.
> Makes no difference to the one you deleted.
below is source for a command you can bind to a key.
thi
___________________________________________
;;; give-me-a-scratch-buffer-now.el
;;;
;;; Rel:v-1-55
;;;
;;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998,2004 Thien-Thi Nguyen
;;; This file is part of ttn's personal elisp library, released under GNU
;;; GPL with ABSOLUTELY NO WARRANTY. See the file COPYING for details.
;;; Description: Find *scratch* buffer; put it in lisp-interaction-mode.
;;; Prefix arg guarantees new buffer.
;;;###autoload
(defun give-me-a-scratch-buffer-now (want-new)
"Bring up *scratch* or younger siblings if prefixed."
(interactive "P")
(switch-to-buffer
(if want-new
(generate-new-buffer "*scratch*")
"*scratch*"))
(lisp-interaction-mode))
(provide 'give-me-a-scratch-buffer-now)
;;; give-me-a-scratch-buffer-now.el ends here