GNU bug report logs - #16525
24.3; Weird font-lock for multi-line regexp

Previous Next

Package: emacs;

Reported by: Alex Kost <alezost <at> gmail.com>

Date: Thu, 23 Jan 2014 08:22:01 UTC

Severity: normal

Tags: notabug

Found in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: Alex Kost <alezost <at> gmail.com>
Cc: 16525 <at> debbugs.gnu.org
Subject: bug#16525: 24.3; Weird font-lock for multi-line regexp
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'.




This bug report was last modified 11 years and 180 days ago.

Previous Next


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