GNU bug report logs - #54769
28.1; Incorrect sql comment highlighting

Previous Next

Package: emacs;

Reported by: emacsq <laszlomail <at> protonmail.com>

Date: Thu, 7 Apr 2022 16:31:01 UTC

Severity: normal

Found in version 28.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 54769 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: emacsq <laszlomail <at> protonmail.com>
Cc: 54769 <at> debbugs.gnu.org
Subject: Re: bug#54769: 28.1; Incorrect sql comment highlighting
Date: Fri, 08 Apr 2022 15:45:16 +0200
emacsq <laszlomail <at> protonmail.com> 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 <larsi <at> gnus.org>
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 <kristian <at> hole.priv.no>.

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




This bug report was last modified 3 years and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.