help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to get rid of default lines in the *scratch* buffer


From: Stefan Monnier
Subject: Re: How to get rid of default lines in the *scratch* buffer
Date: Wed, 10 Dec 2014 08:53:38 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> (switch-to-buffer-other-frame "*scratch*")
> (delete-region (point-min) (point-max))

If you only want to empty the buffer, without any other side effects
(such as displaying the buffer elsewhere):

   (with-current-buffer "*scratch*" (delete-region (point-min) (point-max)))

or just

   (with-current-buffer "*scratch*" (erase-buffer))


-- Stefan






reply via email to

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