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

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

Re: About the `cursor' property


From: Eli Zaretskii
Subject: Re: About the `cursor' property
Date: Fri, 08 Mar 2013 16:15:45 +0200

> Date: Fri, 8 Mar 2013 20:45:47 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
> 
> In (info "(elisp) Special Properties"), there is a `cursor' property.
> 
> It says that:
> 
>   `cursor'
>      Normally, the cursor is displayed at the beginning or the end of
>      any overlay and text property strings present at the current
>      buffer position.  You can place the cursor on any desired
>      character of these strings by giving that character a non-`nil'
>      `cursor' text property. [...]
> 
> I had read through this node, but I still didn't know how to use this
> property.  I tried "(add-text-properties 1 5 '(cursor 2))" in
> *scratch*, but the cursor didn't move.  Can anybody help?  Thanks.

Look at cua-rect.el, there are some revealing examples of how to use
this feature, including setting the property to a numerical value
(which was introduced because cua-rect needed something like this).

In any case, putting this property on buffer text doesn't have any
effect, as Emacs only considers this property on display and overlay
strings.  The fragment you cited from the manual explicitly speaks
about display and overlay strings, for that very reason.



reply via email to

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