emacs-devel
[Top][All Lists]
Advanced

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

Re: region-based face-remapping


From: Stefan Monnier
Subject: Re: region-based face-remapping
Date: Tue, 09 Jan 2024 09:15:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> What I’m struggling with is how to do something “like font lock” —
>> i.e. refontify some potentially substantial fraction of all the faces
>> in a buffer, not (just) on modifications in an after-change-hook, but
>> also on point-dependent “region of interest” changes, with a priority
>> given to the displayed region in the window.  IMO, tree-sitter will
>> make this kind of idea more common.

[ Sorry, I missed the beginning of the thread and haven't had time to go
  and read the previous messages.  ]

IIUC you're discussing features where the appearance of parts of the
buffer depends on the position of point.  The main design issue with it
is what to do when the buffer is displayed in several windows (so there
are several points).  Depending on this, the implementation strategy may
need to be very different.

>> Aside within aside: it would be great if `timer-activate' included an
>> optional no-error argument so you don’t have to check if it is on
>> `timer-list’ twice.  I.e. if a timer is already on timer-list and
>> `timer-activate’ (with no-error) is called on it, do nothing.

The `timer.el` API is geared towards creating/destroying timers.
The other functions (like `timer-activate` and friends) seem to have
been thought mostly for internal use.

In order to reuse timer objects the API needs a few changes.
One of them could be to expose a `timer-active-p`, indeed.
[ Another would be to merge `timer-activate-when-idle` and
  `timer-activate` so the caller doesn't need to care which
  one to call.  ]


        Stefan




reply via email to

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