unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36432: 26.2; SMIE does not request forward tokens when point is at point-max
@ 2019-06-29 12:14 Sam Halliday
  2019-06-29 12:23 ` Eli Zaretskii
  2019-06-29 21:39 ` Stefan Monnier
  0 siblings, 2 replies; 13+ messages in thread
From: Sam Halliday @ 2019-06-29 12:14 UTC (permalink / raw)
  To: 36432

SMIE (via a `indent-for-tab-command') does not request forward tokens
from the lexer when point is at `point-max'.

This might sound like a strange bug report: why should smie expect
there to be any tokens when it is already at point-max? The answer is:
virtual tokens. For example, Haskell may have many closing curly
brackets that live at the end of the buffer.

A workaround is to add a few stray newlines to the end of any buffer
that uses SMIE for indentation. Then SMIE will request the next tokens
(even thought there is only whitespace left until the end of the
buffer) and will receive at least one of those virtuals.





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-06-30  8:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-29 12:14 bug#36432: 26.2; SMIE does not request forward tokens when point is at point-max Sam Halliday
2019-06-29 12:23 ` Eli Zaretskii
2019-06-29 12:34   ` Sam Halliday
2019-06-29 12:42     ` Eli Zaretskii
2019-06-29 12:51       ` Eli Zaretskii
2019-06-29 13:01         ` Sam Halliday
2019-06-29 13:08           ` Eli Zaretskii
2019-06-29 12:51       ` Sam Halliday
2019-06-29 13:06         ` Eli Zaretskii
2019-06-29 13:13           ` Sam Halliday
2019-06-29 13:43             ` Eli Zaretskii
2019-06-29 21:39 ` Stefan Monnier
2019-06-30  8:50   ` Sam Halliday

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).