From 370d4038c5a671d3b9e3a4d28d849948c1a96f53 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 14 Nov 2021 03:14:35 +0100 Subject: [PATCH] Explain in the manual how to make `cursor-intangible' work * doc/lispref/text.texi (Special Properties): Explain how to make `cursor-intangible' work (bug#51095). --- doc/lispref/text.texi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 937680c200d..32773818e5b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -3653,6 +3653,16 @@ property is obsolete; use the @code{cursor-intangible} property instead. When the minor mode @code{cursor-intangible-mode} is turned on, point is moved away from any position that has a non-@code{nil} @code{cursor-intangible} property, just before redisplay happens. +Note that @code{rear-nonsticky} is taken into account when computing +allowed cursor positions, so (for instance) to insert a stretch of +five @samp{x} characters you can't put point on, you have to do +something like: + +@lisp +(insert + (propertize "xxxx" 'cursor-intangible t) + (propertize "x" 'cursor-intangible t 'rear-nonsticky t)) +@end lisp @vindex cursor-sensor-inhibit When the variable @code{cursor-sensor-inhibit} is non-@code{nil}, the -- 2.39.5