开发者

How to start a specific mode with emacs?

开发者 https://www.devze.com 2023-01-13 06:24 出处:网络
Users use \'M-x auto-revert-mod开发者_运维知识库e\' for starting auto revert mode. How can I set the .emacs file to do the same thing when emacs starts?

Users use 'M-x auto-revert-mod开发者_运维知识库e' for starting auto revert mode. How can I set the .emacs file to do the same thing when emacs starts?

How to start a specific mode, when a major mode starts? For example, how to set the .emacs file when I want to start the auto revert mode when LaTeX mode starts?


If you want auto-revert-mode on for all files, add:

(global-auto-revert-mode 1)

If you want it for files for specific modes, try:

(add-hook 'latex-mode-hook '(lambda () (auto-revert-mode 1)))

and substitute the mode name for latex.

0

精彩评论

暂无评论...
验证码 换一张
取 消