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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Richter, Jörg <Joerg.Richter@HIDDEN>; Keywords: fixed; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 27.1, send any further explanations to 37990 <at> debbugs.gnu.org and Richter, Jörg <Joerg.Richter@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 37990 <at> debbugs.gnu.org:


Received: (at 37990) by debbugs.gnu.org; 17 Nov 2019 09:18:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 04:18:00 2019
Received: from localhost ([127.0.0.1]:40295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWGgw-0004cO-7U
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 04:17:58 -0500
Received: from quimby.gnus.org ([95.216.78.240]:45200)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iWGgt-0004cB-VM
 for 37990 <at> debbugs.gnu.org; Sun, 17 Nov 2019 04:17:56 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iWGgl-0005Gg-5R; Sun, 17 Nov 2019 10:17:49 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: <Joerg.Richter@HIDDEN>,  37990 <at> debbugs.gnu.org
Subject: Re: bug#37990: font-lock and string literals
References: <44e350daefb141ddb680fefd4f581928@HIDDEN>
Date: Sun, 17 Nov 2019 10:17:46 +0100
In-Reply-To: <44e350daefb141ddb680fefd4f581928@HIDDEN> (Richter's message
 of "Wed, 30 Oct 2019 12:52:51 +0000")
Message-ID: <87v9ri9805.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Richter, Jörg <Joerg.Richter@HIDDEN> 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 [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37990
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Richter, J=C3=B6rg <Joerg.Richter@HIDDEN> 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.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37990; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Oct 2019 12:52:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 30 08:52:58 2019
Received: from localhost ([127.0.0.1]:49457 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iPnT8-0000Ex-4i
	for submit <at> debbugs.gnu.org; Wed, 30 Oct 2019 08:52:58 -0400
Received: from lists.gnu.org ([209.51.188.17]:51379)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <Joerg.Richter@HIDDEN>) id 1iPnT7-0000Eq-3p
 for submit <at> debbugs.gnu.org; Wed, 30 Oct 2019 08:52:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40571)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <Joerg.Richter@HIDDEN>) id 1iPnT5-0004To-V0
 for bug-gnu-emacs@HIDDEN; Wed, 30 Oct 2019 08:52:56 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Joerg.Richter@HIDDEN>) id 1iPnT4-0004hz-Ts
 for bug-gnu-emacs@HIDDEN; Wed, 30 Oct 2019 08:52:55 -0400
Received: from mail.pdv-fs.de ([213.208.220.5]:58594)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <Joerg.Richter@HIDDEN>)
 id 1iPnT4-0004fV-N3
 for bug-gnu-emacs@HIDDEN; Wed, 30 Oct 2019 08:52:54 -0400
Received: from mail.pdv-fs.de (unknown [192.168.180.95])
 by mail.pdv-fs.de (Postfix) with ESMTPS
 for <bug-gnu-emacs@HIDDEN>; Wed, 30 Oct 2019 13:52:51 +0100 (CET)
Received: from EXCHDB1.pdv-fs.de (192.168.180.94) by EXCHDB2.pdv-fs.de
 (192.168.180.95) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 30
 Oct 2019 13:52:51 +0100
Received: from EXCHDB1.pdv-fs.de ([fe80::6c4a:8b1b:60f4:4437]) by
 EXCHDB1.pdv-fs.de ([fe80::6c4a:8b1b:60f4:4437%15]) with mapi id
 15.01.1713.009; Wed, 30 Oct 2019 13:52:51 +0100
From: =?iso-8859-1?Q?Richter=2C_J=F6rg?= <Joerg.Richter@HIDDEN>
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Subject: font-lock and string literals
Thread-Topic: font-lock and string literals
Thread-Index: AdWPIIf1knRA/etNS2+7CFVKP015TQ==
Date: Wed, 30 Oct 2019 12:52:51 +0000
Message-ID: <44e350daefb141ddb680fefd4f581928@HIDDEN>
Accept-Language: de-DE, en-US
Content-Language: de-DE
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [192.168.180.93]
Content-Type: multipart/alternative;
 boundary="_000_44e350daefb141ddb680fefd4f581928pdvFSde_"
MIME-Version: 1.0
X-TMASE-Version: DDEI-3.5-8.5.1020-25010.007
X-TMASE-Result: 10--6.854300-10.000000
X-TMASE-MatchedRID: /Tnn5EXWEDwBnRWeplXmQW6HurDH4PpPHF25lcCugp9XiLrvhpKLfCjs
 QUYjDATvIndhT2qPapQKGor2wLvegA0QFx1SMBmDwbRQ2Bpmlioay+BQxgCfhdJ6Tp2zXEtus2n
 eI/5I7MJ9t8JTtJvpTgNRYB0OBXEYTl2IJryV1SEkO5bN+/P8x/wxVou9KI15Rf+V8wb93nLgn8
 HV6/VM7ecuA3RsQChwbDEaE7G9A2DfX2sZfyOJoZ4CIKY/Hg3AaZGo0EeYG94JrPsDvSXvNvoLR
 4+zsDTtTpw8o8ZOgpkLFNR0WVnFGlh7M2PP1nPs5xE9l756DwuagH1e2Kvr/FrkwCA49rxYV//F
 6FHWPj52E51VyPVhPwayy2XahnOGkZnzzbogN7o=
X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0-0
X-TMASE-INERTIA: 1-0;;J4gzHMCxkPyYUJl0x8cA1w==;;
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 213.208.220.5
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--_000_44e350daefb141ddb680fefd4f581928pdvFSde_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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=F6rg



--_000_44e350daefb141ddb680fefd4f581928pdvFSde_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:=
 #800000 2px solid; } --></style>
</head>
<body>
<font face=3D"Calibri" size=3D"2"><span style=3D"font-size:11pt;">
<div>Hi,</div>
<div>&nbsp;</div>
<div>I'm using emacs 26.3.</div>
<div>&nbsp;</div>
<div>Call:</div>
<div>&nbsp;</div>
<div>(font-lock-add-keywords</div>
<div> 'c-mode</div>
<div> '(</div>
<div>&nbsp;&nbsp; (&quot;\\&lt;XXX\\&gt;[^;]*;&quot; 0 'font-lock-function-=
name-face t)))</div>
<div>&nbsp;</div>
<div>Then visit a .c file with this line:</div>
<div>&nbsp;</div>
<div>&nbsp; XXX(&quot;aaa&quot;);</div>
<div>&nbsp;</div>
<div>The line is rendered with font-lock-function-name-face, except the sec=
ond &quot; which has font-lock-warning-face.</div>
<div>Somehow emacs thinks there is an unfinished string literal.</div>
<div>&nbsp;</div>
<div> - J=F6rg</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</span></font>
</body>
</html>

--_000_44e350daefb141ddb680fefd4f581928pdvFSde_--





Acknowledgement sent to Richter, Jörg <Joerg.Richter@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#37990; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 17 Nov 2019 09:30:02 UTC

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