From 278e11182c900ea5bed7004e015ef18e383e40bb Mon Sep 17 00:00:00 2001 From: stardiviner Date: Mon, 30 Jan 2017 17:08:52 +0800 Subject: [PATCH] fix different string length for icon and mode-name. --- major-mode-icons.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/major-mode-icons.el b/major-mode-icons.el index 5ba2217..3519b4f 100644 --- a/major-mode-icons.el +++ b/major-mode-icons.el @@ -130,9 +130,13 @@ (icon (cdr match)) (icon-path (concat major-mode-icons-icons-path icon ".xpm"))) (concat - (propertize (format "%s" mode-name) - 'display (if (and (file-exists-p icon-path) (image-type-available-p 'xpm)) - (create-image icon-path 'xpm nil :ascent 'center))) + (if (and (file-exists-p icon-path) (image-type-available-p 'xpm)) + (propertize + " " + 'display (if (and (file-exists-p icon-path) (image-type-available-p 'xpm)) + (create-image icon-path 'xpm nil :ascent 'center))) + (propertize (format "%s" mode-name)) + ) ;;; extra (if extra (propertize (format " %s" (or extra ""))) -- 2.11.4.GIT