summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-06-02 14:29:47 +0200
committerGravatar Tom Willemse2013-06-02 14:29:47 +0200
commit2aef75d7816c4768b7b561b851bcef051c80ca37 (patch)
tree06c24f775ac22c32152989b609e8558c0590dc8e
parent42522017831ece7a35ad72130036d172a0fe2343 (diff)
downloadmode-icons-2aef75d7816c4768b7b561b851bcef051c80ca37.tar.gz
mode-icons-2aef75d7816c4768b7b561b851bcef051c80ca37.zip
Run set-current-mode-icon when starting
Otherwise the currently visited buffer will not have the correct mode icon set.
-rw-r--r--mode-icons.el4
1 files changed, 3 insertions, 1 deletions
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)