3

I've got like 10,000 lines of JS and there's a missing bracket somewhere in there. js2-mode for emacs is supposed to highlight possible syntax errors, but it would still be incredibly time-consuming to look through all 10,000 lines and try to find the one little bracket that is highlighted. Can someone tell me if there is a hotkey that I can use to jump to the next syntax warning?

Dylan
  • 949
  • 3
  • 13
  • 23

1 Answers1

5

As I can see from js2 source code, there is js2-next-error function that should move to next error. It's bound to C-c C-` by default

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
  • hmm, I do see that in the source, but it doesn't seem to be working for me. I just hit C-c and then when I hit C-`, nothing happens. It doesn't even enter that into the command. – Dylan Jul 18 '11 at 18:15
  • You should also be able to access it from the main menu. And if all else fails, there's `M-x js2-next-error` and ability to rebind the key. – Rene Saarsoo Jul 18 '11 at 18:28
  • Well thanks, that worked. The only problem was that it said there were no errors. I guess it must not be able to detect whatever the problem was. Debugging this is going to be interesting, lol. – Dylan Jul 18 '11 at 18:29
  • I just tried it on simple source file with error, and everything worked fine... I have js2-mode version 20090727... – Alex Ott Jul 18 '11 at 18:33
  • hey yeah, I just found the error, it wasn't in the source files that I was looking in, it was in one in a different place that was getting called from them – Dylan Jul 18 '11 at 18:43