diff options
author | Matthew L. Fidler | 2016-02-20 00:14:52 -0600 |
---|---|---|
committer | Matthew L. Fidler | 2016-02-20 00:14:52 -0600 |
commit | 66730cf972118160b03e39cce614d9d06d4f92fe (patch) | |
tree | d3cf1fb1331f228386fc599ab1cf539399bb50ca /mode-icons.el | |
parent | 2f78ec906e07dda971c3bae5bd17a4756fffd567 (diff) | |
download | mode-icons-66730cf972118160b03e39cce614d9d06d4f92fe.tar.gz mode-icons-66730cf972118160b03e39cce614d9d06d4f92fe.zip |
Allow Icon + Major mode name
Diffstat (limited to 'mode-icons.el')
-rw-r--r-- | mode-icons.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mode-icons.el b/mode-icons.el index d7e3a49..15e3c99 100644 --- a/mode-icons.el +++ b/mode-icons.el @@ -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 |