A similar thing happens on python-mode with tree-sitter enabled. Given a buffer with the following code: defun foo(): return 42 If a multi-line comment is inserted as in: """ defun foo(): return 42 """ The function definition does not get fontified as part of a comment. But if I execute C-x x f, then everything looks good. Now If one of the markers is deleted, nothing changes until I execute C-x x f, which then makes everything look correct again. It seems that an auto "refreshing" is missing. On Thu, Oct 27, 2022 at 5:09 PM João Paulo Labegalini de Carvalho < jaopaulolc@gmail.com> wrote: > A similar behavior happens if tree-sitter is not enabled, if the heredoc >> is empty then all subsequent commands are fontified as heredoc. However, as >> soon as anything is added to the heredoc, then everything goes back to the >> correct fontification. >> > > Please ignore the above comment. The "no refresh" bug only happens with > tree-sitter enabled. > > -- > João Paulo L. de Carvalho > Ph.D Computer Science | IC-UNICAMP | Campinas , SP - Brazil > Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - > Canada > joao.carvalho@ic.unicamp.br > joao.carvalho@ualberta.ca > -- João Paulo L. de Carvalho Ph.D Computer Science | IC-UNICAMP | Campinas , SP - Brazil Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada joao.carvalho@ic.unicamp.br joao.carvalho@ualberta.ca