Subject: bug#54769: 28.1; Incorrect sql comment highlighting

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 08 Apr 2022 15:45:16 +0200

emacsq <[email-masked]> writes:

> Attached a small test.sql file where the statement after the comment incorrectly gets
> comment face.

[...]

> /*---*/;
> INSERT INTO `student` (`id`, `name`, `class`, `mark`, `gender`) VALUES (1, 'John Deo', 'Four', 75, 'female');

The trigger for this behaviour seems to be the dash before the asterisk.
This also displays the incorrect behaviour:

/* aa -*/;
INSERT INTO `student` (`id`, `name`, `class`, `mark`, `gender`) VALUES (1, 'John Deo', 'Four', 75, 'female');

This doesn't:

/* aa - */;
INSERT INTO `student` (`id`, `name`, `class`, `mark`, `gender`) VALUES (1, 'John Deo', 'Four', 75, 'female');

And the problem seems to be introduced by:

commit 70825a4d313fddd6f80a1840d775384e848daf9f
Author:     Lars Ingebrigtsen <[email-masked]>
AuthorDate: Mon Aug 10 13:24:19 2020 +0200

    Fix problem with /- incorrectly starting a comment in SQL mode
    
    * lisp/progmodes/sql.el (sql-mode): Move all the syntax setup
    stuff here (bug#35646).  Add handling of -* and /- from Kristian
    Hole <[email-masked]>.

The previous bug was that -* would start a comment, but the fix makes -*
inhibit ending a comment instead.

I've now fixed this in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no