emacsconfigurationsyntax-highlightingvisual-glitch

How to force emacs recolor


Every once and a while Emacs fails at syntax highlighting and the coloring gets all funky in a buffer. Is there any way to force Emacs to "recolor" the syntax? Just try over? I don't mind if it takes a moment.


Solution

  • I think M-x font-lock-fontify-buffer will do what you are looking for. Or select a region and do M-o M-o (or M-x font-lock-fontify-block).