[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexp does not work as documented

From: martin rudalics
Subject: Re: regexp does not work as documented
Date: Tue, 06 May 2008 14:12:45 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> Can someone help me find a workaround, then? If not, I would have to give up
> maintaining po-mode as part of GNU gettext. Said function is central in
> Emacs po-mode (everything else relies on it), and if multi-line regular
> expressions don't work, I don't know how this function could be rewritten.

Don't worry, Stefan will find the solution.  First of all you will
probably have to

(setq font-lock-multiline t)

in the respective buffer.  This will _not_ always DTRT after a buffer
modification, as, for example, in




where AAAA stands for some old text previously matched by your regexp,
CCCC for some new text inserted (or old text removed), and BBBB for some
text which, after the change, is now matched by the regexp (or not
matched any more): In this case BBBB will be wrongly highlighted now.
Alan uses the notorious


function to handle this, but it's not immediately clear how to apply
this here.  If everything else fails you will have to refontify till
`window-end' (I prefer using a timer for such refontifications).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]