Subject: bug#37990: font-lock and string literals

From: Richter, Jörg <[email-masked]>
Date: Wed, 30 Oct 2019 12:52:51 +0000

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