Don't allow diminished major-modes.

This commit is contained in:
Matthew L. Fidler 2016-03-02 09:23:14 -06:00
parent 12587ae51d
commit 4bf5db38cb

View file

@ -468,12 +468,18 @@ ICON-SPEC should be a specification from `mode-icons'."
(defun mode-icons-get-mode-icon (mode)
"Get the icon for MODE, if there is one."
(let* ((mode-name (format-mode-line mode))
(icon-spec (mode-icons-get-icon-spec mode-name)))
(icon-spec (mode-icons-get-icon-spec mode-name))
ret)
(if icon-spec
(setq ret
(if mode-icons-show-mode-name
(concat (mode-icons-propertize-mode mode-name icon-spec) " " mode-name)
(mode-icons-propertize-mode mode-name icon-spec))
mode-name)))
(mode-icons-propertize-mode mode-name icon-spec)))
(setq ret mode-name))
;; Don't hide major mode names...
(when (string= ret "")
(setq ret mode-name))
ret))
(defvar mode-icons-cached-mode-name nil
"Cached mode name to restore when disabling mode-icons.")