如何让 Emacs 启动text-mode
并摆脱以下消息?
;; 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.
如何让 Emacs 启动text-mode
并摆脱以下消息?
;; 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.
要摆脱启动消息,只需将initial-scratch-message
变量设置为""
(setq initial-scratch-message "")
要在文本模式下启动暂存缓冲区,您需要initial-major-mode
更改
(setq initial-major-mode 'text-mode)
要在启动特定主模式时设置自动模式,您需要将事件添加到模式挂钩
(add-hook 'text-mode-hook 'turn-on-auto-fill)
我建议您使用文件参数打开 Emacs,而不是摆弄暂存缓冲区的工作方式。例如,如果您执行“emacs foo.txt”,那么它很可能已经以文本模式启动,而您不必为它做任何特别的事情。
您只在暂存缓冲区中执行 Mx 文本模式。就这样。