mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-21 17:40:30 +01:00
Allow Icon + Major mode name
This commit is contained in:
parent
2f78ec906e
commit
66730cf972
1 changed files with 8 additions and 1 deletions
|
@ -403,12 +403,19 @@ ICON-SPEC should be a specification from `mode-icons'."
|
|||
(throw 'found-mode item)))
|
||||
nil))
|
||||
|
||||
(defcustom mode-icons-show-mode-name nil
|
||||
"Show Icon and `mode-name'."
|
||||
:type 'boolean
|
||||
:group '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)))
|
||||
(if icon-spec
|
||||
(mode-icons-propertize-mode mode-name 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)))
|
||||
|
||||
(defvar mode-icons-cached-mode-name nil
|
||||
|
|
Loading…
Reference in a new issue