Subject: Re: 25.0.50; Fontification on typed text is delayed by 2 chars in antlr-mode

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 31 Oct 2019 18:03:09 +0100

Ilya Yanok <[email-masked]> writes:

> If I open the existing grammar file, fontification works just fine. The
> same for pasting the grammar from the clipboard. But if I type the
> grammar by hand in Emacs buffer, fontification happens only two symbols
> after I type the actual thing to fontify. For example, if I type
>
> test : aaa | bbb ;<RET>
>
> 'test' gets the right face only after I type ':', 'aaa' -- after '|' and
> 'bbb' -- after ';'. ';' itself is never fontified unless I put extra
> spaces after it.
>
> Things get worse in case of multiline grammar. For example, in the snippet
>
> test
>    : aaa
>    | bbb
>    ;
>
> only ':' and '|' get the right faces. For the rest I have to resort to
> spaces trick (or call font-lock-fontify-region).

I tried reproducing this in Emacs 27, but was unable to, so I guess this
has been fixed at some point in the years since you reported this bug,
and I'm closing this bug report.

If you're still seeing this, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no