mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-12-25 14:18:03 +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)
|
||||
"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
|
||||
(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)))
|
||||
(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)))
|
||||
(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.")
|
||||
|
|
Loading…
Reference in a new issue