From d215db6c7b8d8091a51d78c869c2486595ad265d Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 23 Mar 2013 14:02:56 +0100 Subject: Emacs: Fix minor modes widget --- emacs/init.org | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 70b134c..531e6d5 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -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) ""))) -- cgit v1.2.3-54-g00ecf