How get a list of active minor modes in current buffer?
Docs (info "(elisp)Minor Mode Conventions")
say:
Define a variable whose name ends in ‘-mode’. We call this the
"mode variable". The minor mode command should set this variable.
The value will be ‘nil’ if the mode is disabled, and non-‘nil’ if
the mode is enabled. The variable should be buffer-local if the
minor mode is buffer-local.
I ended with:
(dolist (m minor-mode-list)
(when (symbol-value m)
(push m modes)))
describe-mode
sources have notes that:
;; Older packages do not register in minor-mode-list but only in
;; minor-mode-alist.
I don't know if that still valid point...
describe-mode
give you an adequate list of the active minor modes in the current buffer? – Drew Apr 20 '15 at 1:28describe-mode
- if that is otherwise adequate. – Drew Apr 20 '15 at 20:32