Re-open *scratch* buffer in Emacs?

后端 未结 16 1322
北海茫月
北海茫月 2020-12-12 10:29

If I accidentally closed the scratch buffer in Emacs, how do I create a new scratch buffer?

16条回答
  •  一整个雨季
    2020-12-12 10:59

    There are a whole bunch of tips on this EmacsWiki page.

    Here's the first one:

    A very simple function to recreate the scratch buffer:

    (defun create-scratch-buffer nil
       "create a scratch buffer"
       (interactive)
       (switch-to-buffer (get-buffer-create "*scratch*"))
       (lisp-interaction-mode))             
    

提交回复
热议问题