Emacs: apply minor mode for all major modes [duplicate]

拟墨画扇 提交于 2019-12-11 20:22:01

问题


I use the minor mode writeroom which I have set to be global, but this setting only makes the mode global for all text-modes. I can specify more modes in the settings. But is there something I can write to enable this minor mode for all major modes?


回答1:


Add a hook to find-file:

(add-hook 'find-file-hook #'writeroom-mode)

Substitute #'writeroom-mode with whatever function you want to run.



来源:https://stackoverflow.com/questions/26875033/emacs-apply-minor-mode-for-all-major-modes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!