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

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

bug#11068: 24.0.94; Face-remapped background does not extend to end of w


From: martin rudalics
Subject: bug#11068: 24.0.94; Face-remapped background does not extend to end of window
Date: Fri, 30 Mar 2012 12:14:37 +0200

> What are you trying to accomplish by putting the `cursor' property on
> more than a single character of the overlay string?

I thought I _have_ to do that in order to make the overlay know that for
every character covered by the 'cursor property the appropriate position
where to display the cursor is "1".  Apparently, the display engine does
derive that all by itself (which is good) but for me it was difficult to
understand.

> The display
> engine doesn't expect it to be on more than one character in the
> overlay string (it will put the cursor on the first and ignore the
> rest).

It's a good reaction but difficult to analyze.

> The string character on which you put the `cursor' property of any
> non-nil value is the character where you want the cursor displayed.

Aha.  It's now clear to me from the manual.  Initially, I thought that

  (overlay-put my-overlay 'cursor 3)

would put the cursor on the third character after the overlay's start
and after noticing that this does not happen I got lost.

> The value says for which buffer positions to display the cursor
> there.  If the value is an integer number, the cursor is displayed
> there when the buffer position is between N and N + n, where n is the
> value of the property and N is the overlay-start position.  If the
> value is anything else and non-nil, the cursor is displayed there only
> when point is at overlay-start.

I see that now.  It's not intuitive for me why I would want such
behavior (and it apparently doesn't work for negative numbers) but I
suppose it's needed by cua.  So the documentation is correct (once you
understand how it works ;-) ) just that the following part

     it specifies the number of buffer's
     character positions associated with the overlay string;

is misleading.  Maybe "associated with" could become "affected by"?

> ??? I clearly see it in this snippet from cua-rect.el:

Another oversight.  I didn't notice that `ms' and `as' are put on
overlays.

Thanks, martin





reply via email to

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