mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-21 17:40:30 +01:00
Add minor-mode
The `mode-icons-mode' minor-mode enables/disables the setting of icons for each mode.
This commit is contained in:
parent
68fa015bf7
commit
1e8fcc4982
1 changed files with 7 additions and 0 deletions
|
@ -87,5 +87,12 @@ ICON-SPEC should be a specification from `mode-icons'."
|
|||
"Set the icon for the current major mode."
|
||||
(set-mode-icon mode-name))
|
||||
|
||||
(define-minor-mode mode-icons-mode
|
||||
"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)
|
||||
(remove-hook 'after-change-major-mode-hook 'set-current-mode-icon)))
|
||||
|
||||
(provide 'mode-icons)
|
||||
;;; mode-icons.el ends here
|
||||
|
|
Loading…
Reference in a new issue