[Top][All Lists]

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

Re: Bug in highlight-lines-matching-regexp?

From: Deniz Dogan
Subject: Re: Bug in highlight-lines-matching-regexp?
Date: Mon, 20 Apr 2009 17:59:37 +0200

2009/4/20 martin rudalics <address@hidden>:
>> 1. Open a text file with any relevant contents.
>> 2. M-x highlight-lines-matching-regexp and highlight something in the
>> file.
>> 3. M-x revert-buffer RET yes RET
>> 4. Now the highlighting is gone, which I can accept, however...
>> 5. M-x highlight-lines-matching-regexp RET RET
>> 6. Nothing is highlighted this second time!
>> Is this a bug or expected behavior?
> It's unexpected behavior.  You can, after reverting, turn _off_
> `hi-lock-mode' and enter your pattern then, but that's clumsy.
> Either `hi-lock-mode' should add a function to `before-revert-hook'
> which resets `hi-lock-interactive-patterns' or add a function to
> `after-revert-hook' which either resets `hi-lock-interactive-patterns'
> or adds the interactive patterns to `font-lock-keywords' so that all
> patterns are preserved.  I'm not sure which behavior is preferable.
> For non-font-locked buffers all hi-lock overlays should probably be
> removed (and possibly regenerated) too.

FWIW, personally, I would expect the highlighting to preserved (or
rather "repeated") even after revert-buffer.

Deniz Dogan

reply via email to

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