describe-mode can somehow find a list of allowed minor modes, why couldn't I? Therefore, after reading the source code, I realized that it receives a list of active minor modes from minor-mode-list and minor-mode-alist . Using a third-party dash.el list manipulation library. I came with this code:
(--filter (and (boundp it) (symbol-value it)) minor-mode-list)
So, for example, to turn off all minor modes, use -each :
(--each (--filter (and (boundp it) (symbol-value it)) minor-mode-list) (funcall it -1))
Remember to save the list of minor modes in a variable, otherwise you will have to restart Emacs or turn them on from memory.
Mirzhan Irkegulov Dec 12 '14 at 16:21 2014-12-12 16:21
source share