From: Joost Kremers <joostkremers@fastmail.fm>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-devel@gnu.org
Subject: Re: Q: Invisible text spec + define minor mode macro
Date: Wed, 21 Apr 2021 11:36:10 +0200 [thread overview]
Message-ID: <871rb4x8uj.fsf@fastmail.fm> (raw)
In-Reply-To: <AM9PR09MB4977B58F697384012D6C37FA96479@AM9PR09MB4977.eurprd09.prod.outlook.com>
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
next prev parent reply other threads:[~2021-04-21 9:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 8:04 Q: Invisible text spec + define minor mode macro Arthur Miller
2021-04-21 9:16 ` Eli Zaretskii
2021-04-21 9:55 ` Arthur Miller
2021-04-21 17:19 ` Arthur Miller
2021-04-21 17:46 ` Eli Zaretskii
2021-04-21 19:25 ` Tassilo Horn
2021-04-21 20:14 ` Arthur Miller
2021-04-21 9:36 ` Joost Kremers [this message]
2021-04-21 10:02 ` Arthur Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rb4x8uj.fsf@fastmail.fm \
--to=joostkremers@fastmail.fm \
--cc=arthur.miller@live.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).