mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-24 10:30:30 +01:00
Don't allow diminished major-modes.
This commit is contained in:
parent
12587ae51d
commit
4bf5db38cb
1 changed files with 11 additions and 5 deletions
|
@ -468,12 +468,18 @@ ICON-SPEC should be a specification from `mode-icons'."
|
||||||
(defun mode-icons-get-mode-icon (mode)
|
(defun mode-icons-get-mode-icon (mode)
|
||||||
"Get the icon for MODE, if there is one."
|
"Get the icon for MODE, if there is one."
|
||||||
(let* ((mode-name (format-mode-line mode))
|
(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
|
(if icon-spec
|
||||||
(if mode-icons-show-mode-name
|
(setq ret
|
||||||
(concat (mode-icons-propertize-mode mode-name icon-spec) " " mode-name)
|
(if mode-icons-show-mode-name
|
||||||
(mode-icons-propertize-mode mode-name icon-spec))
|
(concat (mode-icons-propertize-mode mode-name icon-spec) " " mode-name)
|
||||||
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
|
(defvar mode-icons-cached-mode-name nil
|
||||||
"Cached mode name to restore when disabling mode-icons.")
|
"Cached mode name to restore when disabling mode-icons.")
|
||||||
|
|
Loading…
Reference in a new issue