Emacs: Fix minor modes widget

This commit is contained in:
Tom Willemsen 2013-03-23 14:02:56 +01:00
parent 534a2e1ab7
commit d215db6c7b

View file

@ -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)
"")))