unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37990: font-lock and string literals
@ 2019-10-30 12:52 Richter, Jörg
  2019-11-17  9:17 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Richter, Jörg @ 2019-10-30 12:52 UTC (permalink / raw)
  To: 37990

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

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



[-- Attachment #2: Type: text/html, Size: 1121 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#37990: font-lock and string literals
  2019-10-30 12:52 bug#37990: font-lock and string literals Richter, Jörg
@ 2019-11-17  9:17 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-17  9:17 UTC (permalink / raw)
  To: Joerg.Richter, 37990

Richter, Jörg <Joerg.Richter@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-17  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 12:52 bug#37990: font-lock and string literals Richter, Jörg
2019-11-17  9:17 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).