How do I run an arbitrary function upon starting up Emacs?
My specific problem: in spacemacs
, I have added the following to the config section of my .spacemacs
file:
(add-hook 'evil-insert-state-exit-hook 'linum-relative-on)
(add-hook 'evil-insert-state-entry-hook 'linum-relative-off)
It works well, but I've noticed that this config produces weird behaviour if I don't first execute linum-relative-toggle
immediately after opening spacemacs
and before editing a file.
How can I get Emacs to automatically execute linum-relative-toggle
on start up?