aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew L. Fidler2016-01-22 22:49:44 -0600
committerMatthew L. Fidler2016-01-22 22:49:44 -0600
commitf0f3103a49dff06dfe825ff161ba4cec4fb7ffb2 (patch)
treeeb724b51639cc9082f0472f81755eba2e9c40b39
parent7f3f53b51074b57253548b6bf90c7e40770ad6dd (diff)
downloadmode-icons-f0f3103a49dff06dfe825ff161ba4cec4fb7ffb2.tar.gz
mode-icons-f0f3103a49dff06dfe825ff161ba4cec4fb7ffb2.zip
Fix the diminished modes so they display nothing
-rw-r--r--mode-icons.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/mode-icons.el b/mode-icons.el
index 96cbe46..fac2833 100644
--- a/mode-icons.el
+++ b/mode-icons.el
@@ -200,19 +200,19 @@ ICON-SPEC should be a specification from `mode-icons'."
(when minor
(or (assq (car mode) mode-icons-set-minor-mode-icon-alist)
(push (copy-sequence minor) mode-icons-set-minor-mode-icon-alist))
- (setq mode-name (replace-regexp-in-string "^ " "" mode-name))
- (setcdr minor (list (concat (or (and mode-icons-separate-images-with-spaces " ") "")
- (mode-icons-propertize-mode mode-name icon-spec)))))))))
+ (setq mode-name (replace-regexp-in-string "^ " "" mode-name)
+ mode-name (mode-icons-propertize-mode mode-name icon-spec))
+ (if (string= "" mode-name)
+ (setcdr minor (list ""))
+ (setcdr minor (list (concat (or (and mode-icons-separate-images-with-spaces " ") "")
+ mode-name)))))))))
(force-mode-line-update))
(defun mode-icons--generate-minor-mode-list ()
"Extracts all rich strings necessary for the minor mode list."
- (delete "" (mapcar (lambda(mode)
- (let ((pm (eval `(propertize ,mode ,@mode-icons-minor-mode-base-text-properties))))
- (unless (string= pm "")
- (setq pm (concat " " pm)))
- pm))
- (split-string (format-mode-line minor-mode-alist)))))
+ (delete " " (delete "" (mapcar (lambda(mode)
+ (concat " " (eval `(propertize ,mode ,@mode-icons-minor-mode-base-text-properties))))
+ (split-string (format-mode-line minor-mode-alist))))))
;; Based on rich-minority by Artur Malabarba
(defvar mode-icons--backup-construct nil)