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
|
||||
(defun oni:smt/minor-mode-indicator-text (widget)
|
||||
(let ((text (concat
|
||||
(when (bound-and-true-p auto-complete-mode) "C")
|
||||
(when (bound-and-true-p auto-fill-mode) "F")
|
||||
(when (bound-and-true-p eldoc-mode) "D"))))
|
||||
(let* ((mm-alist '((auto-complete-mode . "AC ")
|
||||
(auto-fill-mode . "AF ")
|
||||
(eldoc-mode . "LD ")
|
||||
(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))
|
||||
(concat " " text)
|
||||
"")))
|
||||
|
|
Loading…
Reference in a new issue