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.

Full log


View this message in rfc822 format

From: Richter, Jörg <Joerg.Richter <at> pdv-FS.de>
To: 37990 <at> debbugs.gnu.org
Subject: bug#37990: 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)]

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

Previous Next


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