Add autoload cookie, remove hook

The hook should be set in the user's init file, not in the source
file.
This commit is contained in:
Tom Willemsen 2012-12-05 00:52:04 +01:00
parent 5e0c221d58
commit 1bf87fee9a

View file

@ -59,10 +59,9 @@
(when icon-spec (when icon-spec
(setq mode-name (propertize mode 'display (cdr icon-spec)))))) (setq mode-name (propertize mode 'display (cdr icon-spec))))))
;;;###autoload
(defun set-current-mode-icon () (defun set-current-mode-icon ()
(set-mode-icon mode-name)) (set-mode-icon mode-name))
(add-hook 'after-change-major-mode-hook 'set-current-mode-icon)
(provide 'mode-icons) (provide 'mode-icons)
;;; mode-icons.el ends here ;;; mode-icons.el ends here