All I want to do is enable tern-mode, when I enter js-mode. I know that a hook called js-mode is run when I open a javascript file but for some reason tern-mode is not enabled. In my init.el file I have:
(add-hook 'js2-mode-hook (lambda () ('tern-mode)))
I also tried:
(add-hook 'js2-mode-hook (lambda () (tern-mode t)))
as well as both of those with js-mode-hook (This was mostly for fun though because it makes no difference, see the comments)
I have also tried:
(add-hook 'js-mode-hook 'tern-mode)
And this does't work. However, tern-mode does not get enabled when I enter js2-mode. To enable it, each time I have to press M-x tern-mode, then it works.
Is there anything I am doing wrong here?