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

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

bug#33664: 26.1; Document vars and functions in `cursor-sensor.el'


From: Drew Adams
Subject: bug#33664: 26.1; Document vars and functions in `cursor-sensor.el'
Date: Sat, 8 Dec 2018 19:53:38 -0800 (PST)

> > Juri reads bug reports, and he has worked on Isearch
> > (dunno whether he worked on this part of it).  Maybe
> > the design/use of the var for Isearch could be
> > documented in a comment in `isearch.el', at least.
> 
> I could help but I know nothing about cursor-sensor.
> Please explain the purpose of cursor-sensor, then
> I'll write a comment in `isearch.el'.

I too know nothing about it.

I was hoping that it was perhaps you who added its
use in Isearch.

It is apparently a replacement for using text
property `intangible', which its comments say
is too low-level.  It activates the intangibility
of text when you turn on `cursor-intangible-mode'.

The point of the bug report is to get a little
more doc for it.

Isearch's use of it seems to be to just make
sure that intangible text is not recognized
as such, i.e., it is treated as normal,
tangible text by Isearch.  At least that's
my reading of the code.

Isearch seems to politely ensure that it does
not interfere with other uses of variable
`cursor-sensor-inhibit'  It does so not by
recording the value before changing it, and
then restoring that value when finished, but
adding a non-nil value to it as a list element.

That seems like a good (and interesting)
approach.  But there is nothing in the definition,
doc, or comments for that var that would lead one
to understand that that's a good (or recommended)
way to use it, let alone the expected way.





reply via email to

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