[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Showing text in a buffer only when point is in a region
From: |
tomas |
Subject: |
Re: Showing text in a buffer only when point is in a region |
Date: |
Sat, 28 Jan 2017 13:46:10 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, Jan 28, 2017 at 06:03:57PM +0530, Narendra Joshi wrote:
>
> Hi,
>
> I want to be able to keep some text visible in a buffer only when the
> point is in a region. The moment the point leaves that region, I would
> like to make the text invisible. How can I do this? I don't want to run
> a timer which checks if the point is in the region or outside.
See "Overlays" or "Text Properties" in the Emacs Lisp manual. You can set
"point-entered" and "point-left" special properties (see "Properties with
Special Meanings", which are hooks to be called at those events.
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAliMkpIACgkQBcgs9XrR2kZouwCfbsifIUe6EbXLmXRUR2DLT0xE
sqQAn1zxVcu0QAgeE7BrIW59syIqRN8k
=IsGC
-----END PGP SIGNATURE-----