]> git.eshelyaron.com Git - emacs.git/commitdiff
Explain in the manual how to make `cursor-intangible' work
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Nov 2021 02:14:35 +0000 (03:14 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Nov 2021 02:14:39 +0000 (03:14 +0100)
* doc/lispref/text.texi (Special Properties): Explain how to make
`cursor-intangible' work (bug#51095).

doc/lispref/text.texi

index 937680c200d1e06291d9bb7a59a687516e979d34..32773818e5b1121b8d5794b1c1b681211355d140 100644 (file)
@@ -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