emacs-devel
[Top][All Lists]
Advanced

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

Re: Q: Invisible text spec + define minor mode macro


From: Joost Kremers
Subject: Re: Q: Invisible text spec + define minor mode macro
Date: Wed, 21 Apr 2021 11:36:10 +0200
User-agent: mu4e 1.5.11; emacs 27.2

On Wed, Apr 21 2021, Arthur Miller wrote:
> I am not sure what is going on here. I have this minor mode defined,
> as shown yesterday, where I just iterate through a buffer and try to
> make certain lines invisible.

Wouldn't it be easier to use the font lock mechanism for this? That way, you
basically only need to worry about getting the regexp right. Finding matches, 
updating the display, etc. is all handled by Emacs.

The `invisible' property is not normally handled by font lock, I guess, but
there is a variable `font-lock-extra-managed-props', which, by the looks of it,
should be able to remedy that.

Mind you, I only understand the basics of the font lock mechanism and I haven't
tried this, so it's possible this is a silly suggestion. It's just the first
thing I'd try...


-- 
Joost Kremers
Life has its moments



reply via email to

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