Subject: Re: bug#16525: 24.3; Weird font-lock for multi-line regexp

From: Glenn Morris <[email-masked]>
Date: Thu, 23 Jan 2014 03:30:05 -0500

Alex Kost wrote:

> When I try to use a multi-line regexp in `font-lock-keywords', I have an
> unusual result: some lines are highlighted and some are not (lines are
> the same).
[...]
> (defun test-font-lock-keywords ()
>   '(("^<\\(foo\\)> \\(.+\\(?:
>  .+?\\)\\)\\(\\[.*\\]\\)$"
>      (1 'font-lock-function-name-face)
>      (2 'font-lock-comment-face)
>      (3 'font-lock-string-face))))

It's not that simple. See info node `(elisp)Font Lock Multiline'.