aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew L. Fidler2016-02-20 00:14:52 -0600
committerMatthew L. Fidler2016-02-20 00:14:52 -0600
commit66730cf972118160b03e39cce614d9d06d4f92fe (patch)
treed3cf1fb1331f228386fc599ab1cf539399bb50ca
parent2f78ec906e07dda971c3bae5bd17a4756fffd567 (diff)
downloadmode-icons-66730cf972118160b03e39cce614d9d06d4f92fe.tar.gz
mode-icons-66730cf972118160b03e39cce614d9d06d4f92fe.zip
Allow Icon + Major mode name
-rw-r--r--mode-icons.el9
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