我该在我的.emacs
文件中写什么,才能让打开Emacs时关闭*scratch*
缓冲区?
(kill-buffer "*scratch*")
虽然不完全回答了你的问题,但你可能会想知道,在启动时可以选择打开一个不同的缓冲区,或更改 *scratch* 缓冲区的内容。例如:
;; 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)
在第一个示例中,*scratch* 缓冲区将为空。在第二个示例中,*scratch* 缓冲区仍将存在,但 user-init-file 将是焦点。您可以自定义:
initial-buffer-choice
我将它设置为我的主目录:"~/",以便在Dired模式下启动。
inhibit-startup-screen
添加到您的.emacs文件的custom-set-variables
部分。(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t)
)