Refresh auctex syntax highlighting

When I am editing long LaTeX documents using auctex in emacs, sometimes the syntax highlighting goes wrong and normal text is coloured as being mathematics and vice-versa. I recently discovered by accident that C-c C-n (which runs the command TeX-normal-mode) refreshes the highlighting and fixes this (until it happens again).

  • Jarvis Schultz

    That’s fantastic! For years I’ve been using C-x C-v to call find-alternate-file to just re-open the file in the same buffer. This is faster and less ridiculous.

    • Ben Maughan

      Yes – I used to do ridiculous things like edit and revert the buffer to fix it. It was one of those things I never got round to sorting out, and then I used C-c C-n to try to jump to the next section as if I was in org mode, and it cleaned itself up.