Subject: Re: bug#36432: 26.2; SMIE does not request forward tokens when point is at point-max

From: Eli Zaretskii <[email-masked]>
Date: Sat, 29 Jun 2019 15:42:27 +0300

> From: Sam Halliday <[email-masked]>
> Date: Sat, 29 Jun 2019 13:34:06 +0100
> Cc: [email-masked]
> 
> > ??? There can be noting at point-max, as that position is beyond the
> > last buffer position.  Did you mean the position just before that?  Or
> > am I missing something here?
> >
> 
> I mean at point-max.
> 
> Consider this layout algorithm
> 
> https://gitlab.com/tseenshe/haskell-tng.el/blob/tng/haskell-tng-layout.el
> 
> and this lexer
> 
> https://gitlab.com/tseenshe/haskell-tng.el/blob/tng/haskell-tng-lexer.el
> 
> that can continue to produce tokens even when the point is at the very
> end of the buffer.

So you create an illusion of characters beyond the EOB?

How would Emacs know this is the case?  Why don't you also override
point-max to make it consistent with those illusory characters?