help-gnu-emacs
[Top][All Lists]
Advanced

[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: Stephen Berman
Subject: Re: Showing text in a buffer only when point is in a region
Date: Sat, 28 Jan 2017 15:45:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Sat, 28 Jan 2017 13:46:10 +0100 <tomas@tuxteam.de> wrote:

> 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.

As of Emacs 25.1 (quoting the Info node referred to):

"These properties are obsolete; please use ‘cursor-sensor-functions’ instead."

Steve Berman



reply via email to

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