From 2aef75d7816c4768b7b561b851bcef051c80ca37 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 2 Jun 2013 14:29:47 +0200 Subject: [PATCH] Run set-current-mode-icon when starting Otherwise the currently visited buffer will not have the correct mode icon set. --- mode-icons.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mode-icons.el b/mode-icons.el index da85875..8807d52 100644 --- a/mode-icons.el +++ b/mode-icons.el @@ -91,7 +91,9 @@ ICON-SPEC should be a specification from `mode-icons'." "Replace the name of the current major mode with an icon." :global t (if mode-icons-mode - (add-hook 'after-change-major-mode-hook 'set-current-mode-icon) + (progn + (add-hook 'after-change-major-mode-hook 'set-current-mode-icon) + (set-current-mode-icon)) (remove-hook 'after-change-major-mode-hook 'set-current-mode-icon))) (provide 'mode-icons)