Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions minions.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
;;; Code:

(require 'cl-lib)
(require 'seq)

(eval-when-compile
(require 'subr-x))
Expand Down Expand Up @@ -154,9 +153,7 @@ mouse-3: Toggle minor modes"
'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map
'mouse-2 #'mode-line-widen))
`(:propertize ("" (:eval (seq-filter (pcase-lambda (`(,mode))
(memq mode minions-direct))
minor-mode-alist)))
`(:propertize ("" (:eval (minions--modes-direct)))
mouse-face mode-line-highlight
help-echo "Minor mode
mouse-1: Display minor mode menu
Expand Down Expand Up @@ -215,6 +212,11 @@ Otherwise the entry can only be used to toggle the mode."
(popup-menu map)
(quit nil))))

(defun minions--modes-direct ()
(cl-remove-if-not (lambda (mode)
(memq (car mode) minions-direct))
minor-mode-alist))

(defun minions--modes ()
(let (local global)
(dolist (mode (cl-set-difference
Expand Down