How to check whether a minor mode(.e.g flymake-mode) is on?
Most minor modes are defined using the define-minor-mode macro. For buffer-local modes, that macro creates a buffer-local variable of the same name as the mode itself1. The variable is non-nil when the mode is enabled for the current buffer. Therefore to check whether flymake-mode is enabled, you can test the variable flymake-mode (noting that this … Read more