larsbrinkhoff / forth-mode

Wants to be the SLIME of Forth
GNU General Public License v3.0
61 stars 17 forks source link

Problematic syntax class for ( and \ #11

Closed ellerh closed 7 years ago

ellerh commented 7 years ago

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 like a\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.

larsbrinkhoff commented 7 years ago

Yes, I agree. Using syntax tables can only be an approximation for Forth syntax.

Reepca commented 7 years ago

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.

larsbrinkhoff commented 7 years ago

I think this can be closed now?