Closed ellerh closed 7 years ago
Yes, I agree. Using syntax tables can only be an approximation for Forth syntax.
I see now that this has been mentioned already - was about to post an issue mentioning that a single-line comment will still have everything after a ) in it un-highlighted, but it seems like this has already been noticed.
I think this can be closed now?
I think the idea to set the syntax class of
(
to"<1"
is problematic, because it doesn't work well for words like(LOCAL)
. The same problem for\
which can also be part of normal word names likea\b
.Whoever wrote gforth.el seems to think that Emacs' syntax tables aren't of much use for Forth and instead highlights comments "manually". (Admidettly, the highlighting and indentation of gforth.el is only half bad. The implementation is weird, though.)
Maybe a compromise between syntax tables and an custom
syntax-propertize-function
to fix the corner cases would work better.