启动默认Buffer设置
Emacs启动后默认有三个Buffer:
- *GNU Emacs*,Emacs的欢迎界面
- *scratch*,在这个Buffer中可以随意输入文本,退出Emacs时不会提醒保存
- *Messages*,提示信息全部都存在这个Buffer中
关闭欢迎界面
*GNU Emacs*作为欢迎界面,对我们的用处并不大,可以在启动时禁用这个Buffer。在初始化文件中加入以下代码:
(setq inhibit-startup-message nil)
设置Scratch Buffer的默认内容
Emacs启动后,*scratch* Buffer的默认内容是一段注释信息:
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.
我们可以自定义默认内容,在配置文件中加入:
(setq initial-scratch-message "")
这里将默认内容设置为空,如果要设置成自己喜欢的默认文字,修改上方setq第二个参数的字符串内容即可。