dykstrom / basic-mode

Emacs major mode for editing BASIC code
GNU General Public License v3.0
7 stars 10 forks source link

REM is not syntactically a comment #15

Closed hackerb9 closed 1 year ago

hackerb9 commented 2 years ago

While it is being highlighted like a comment, a rem statement is not actually a comment. This causes problems when the text after a REM contains an apostrophe ('), which emacs does recognize as a comment from the syntax table The solution is to add REM to the syntax table, like so:

 (setq-local syntax-propertize-function
              (syntax-propertize-rules ("\\(\\_<REM\\_>\\)" (1 "<"))))