1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-06-04 19:45:29 -07:00

doc/lispref/text.texi: Add complement to commit f4a1c00656

* doc/lispref/text.texi (Examining Properties): Mention the change in
cursor-sensor-functions.
This commit is contained in:
Stefan Monnier 2026-05-18 18:47:47 -04:00
parent 9436d92c5d
commit 8095fbef77
2 changed files with 20 additions and 0 deletions

View file

@ -3042,6 +3042,7 @@ followed by the text properties. If @var{object} is a string, only
text properties are considered, since strings never have overlays. text properties are considered, since strings never have overlays.
@end defun @end defun
@anchor{Boundaries of text and overlay properties}
@defun get-pos-property position prop &optional object @defun get-pos-property position prop &optional object
This function is like @code{get-char-property}, except that it pays This function is like @code{get-char-property}, except that it pays
attention to properties' stickiness and overlays' advancement settings attention to properties' stickiness and overlays' advancement settings
@ -4019,6 +4020,10 @@ The movement can be @code{entered} or @code{left}, depending on whether
the cursor is entering the text that has this property or leaving it, or the cursor is entering the text that has this property or leaving it, or
@code{moved} when the cursor moved within that text. @code{moved} when the cursor moved within that text.
Other values for the direction should be ignored. Other values for the direction should be ignored.
Whether the boundary positions (at the beginning and end of an overlay or
a stretch of text-property) are considered as inside or outside follows
the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
text and overlay properties}.
The functions are called only when the minor mode The functions are called only when the minor mode
@code{cursor-sensor-mode} is turned on. @code{cursor-sensor-mode} is turned on.

View file

@ -3987,6 +3987,21 @@ all versions, sleep events require Windows 8 or later).
* Incompatible Lisp Changes in Emacs 31.1 * Incompatible Lisp Changes in Emacs 31.1
+++
** Boundaries of 'cursor-sensor-functions' now obey stickiness.
'cursor-sensor-mode' now uses 'get-pos-property' to decide whether a
boundary is considered as inside or outside.
This means that by default, the boundaries have changed: the end
position of a stretch of a 'cursor-sensor-functions' text property
used to be considered outside of the stretch whereas it is now
considered as inside. You can recover the previous behavior by
controlling the stickiness, for example with a call like:
(add-text-properties BEG END
'(cursor-sensor-functions (MY-FUNCTION)
rear-nonsticky (cursor-sensor-functions)))
+++ +++
** 'makunbound' on a variable alias undoes the alias. ** 'makunbound' on a variable alias undoes the alias.
Previously, it had the effect of applying the 'makunbound' on the Previously, it had the effect of applying the 'makunbound' on the