Automatically closing the scratch buffer

前端 未结 6 1961
-上瘾入骨i
-上瘾入骨i 2021-02-04 05:32

What I must write in my .emacs file so that the *scratch* buffer is closed when I open Emacs?

6条回答
  •  梦谈多话
    2021-02-04 05:58

    Not exactly the answer to your question, but you might like to know that you can choose to have a different buffer open on startup, or change the contents of the *scratch* buffer. For example:

    ;; Make *scratch* buffer blank.
    (setq initial-scratch-message nil)
    
    ;; Make the buffer that opens on startup your init file ("~/.emacs" or
    ;; "~/.emacs.d/init.el").
    (setq initial-buffer-choice user-init-file) 
    

    In the first example, the *scratch* buffer will be empty. In the second example, the *scratch* buffer will still exist, but user-init-file will be focused.

提交回复
热议问题