Emacs: Fix minor modes widget
This commit is contained in:
parent
534a2e1ab7
commit
d215db6c7b
1 changed files with 11 additions and 4 deletions
|
@ -363,10 +363,17 @@ functionality, plus more.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:smt/minor-mode-indicator-text (widget)
|
(defun oni:smt/minor-mode-indicator-text (widget)
|
||||||
(let ((text (concat
|
(let* ((mm-alist '((auto-complete-mode . "AC ")
|
||||||
(when (bound-and-true-p auto-complete-mode) "C")
|
(auto-fill-mode . "AF ")
|
||||||
(when (bound-and-true-p auto-fill-mode) "F")
|
(eldoc-mode . "LD ")
|
||||||
(when (bound-and-true-p eldoc-mode) "D"))))
|
(paredit-mode . "()")))
|
||||||
|
(text (apply 'concat
|
||||||
|
(mapcar
|
||||||
|
(lambda (pair)
|
||||||
|
(when (and (boundp (car pair))
|
||||||
|
(symbol-value (car pair)))
|
||||||
|
(cdr pair)))
|
||||||
|
mm-alist))))
|
||||||
(if (plusp (length text))
|
(if (plusp (length text))
|
||||||
(concat " " text)
|
(concat " " text)
|
||||||
"")))
|
"")))
|
||||||
|
|
Loading…
Reference in a new issue