automatically disable a global minor mode for a specific major mode

Global minor modes created with the define-globalized-minor-mode1 macro are a bit tricky. The reason your code doesn’t appear to do anything is that globalized modes utilise after-change-major-mode-hook to activate the buffer-local minor mode that they control; and that hook runs immediately after the major mode’s own hooks4. Individual modes may implement custom ways of specifying … Read more