Attached is a patch that fixes this by using the following syntax-propertize-function: (set (make-local-variable 'syntax-propertize-function) (syntax-propertize-rules ("\\(/-\\)" (1 ".")) ("\\(-\\*\\)" (1 ".")))) Adds sql-mode syntax propertize rules to fix comment highlighting Fixes the issue where -* and /- incorrectly starts comments in SQL mode Bug(#35646). This is done by adding a syntax-propertize-function to sql-mode.