GNU bug report logs - #37990
font-lock and string literals

Previous Next

Package: emacs;

Reported by: Richter, Jörg <Joerg.Richter <at> pdv-FS.de>

Date: Wed, 30 Oct 2019 12:53:01 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37990 in the body.
You can then email your comments to 37990 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37990; Package emacs. (Wed, 30 Oct 2019 12:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richter, Jörg <Joerg.Richter <at> pdv-FS.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 30 Oct 2019 12:53:02 GMT) Full text and rfc822 format available.

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

From: Richter, Jörg <Joerg.Richter <at> pdv-FS.de>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: font-lock and string literals
Date: Wed, 30 Oct 2019 12:52:51 +0000
[Message part 1 (text/plain, inline)]
Hi,

I'm using emacs 26.3.

Call:

(font-lock-add-keywords
 'c-mode
 '(
   ("\\<XXX\\>[^;]*;" 0 'font-lock-function-name-face t)))

Then visit a .c file with this line:

  XXX("aaa");

The line is rendered with font-lock-function-name-face, except the second " which has font-lock-warning-face.
Somehow emacs thinks there is an unfinished string literal.

 - Jörg


[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37990; Package emacs. (Sun, 17 Nov 2019 09:18:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: <Joerg.Richter <at> pdv-FS.de>,  37990 <at> debbugs.gnu.org
Subject: Re: bug#37990: font-lock and string literals
Date: Sun, 17 Nov 2019 10:17:46 +0100
Richter, Jörg <Joerg.Richter <at> pdv-FS.de> writes:

> I'm using emacs 26.3.
>
> Call:
>
> (font-lock-add-keywords
> 'c-mode
> '(
>    ("\\<XXX\\>[^;]*;" 0 'font-lock-function-name-face t)))
>
> Then visit a .c file with this line:
>
>   XXX("aaa");
>
> The line is rendered with font-lock-function-name-face, except the second "
> which has font-lock-warning-face.
> Somehow emacs thinks there is an unfinished string literal.

I'm able to reproduce this in Emacs 26, but not in Emacs 27, so I think
this has been fixed by now.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 17 Nov 2019 09:19:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 37990 <at> debbugs.gnu.org and Richter, Jörg <Joerg.Richter <at> pdv-FS.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 17 Nov 2019 09:19:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 15 Dec 2019 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 247 days ago.

Previous Next


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