Emacs: apply minor mode for all major modes

373 views Asked by At

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

There are 1 answers

0
Sean Allred On

Add a hook to find-file:

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

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