[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: customize-face
From: |
martin rudalics |
Subject: |
Re: customize-face |
Date: |
Tue, 06 Dec 2005 13:53:59 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> :notify will now change the text following the State button from "SAVED
> and set." to "EDITED, shown value does not take effect until you set or
> save it." The first of these strings is 14 characters long, the second
> 66. The difference of their length is 52.
>
> I see.
>
> This edit ought to relocate the buffer positions that will be used
> later. If they were stored in markers, that would happen automatically.
> Where are these positions being stored?
In :field-overlay. They are retrieved by `widget-field-find' via
`widget-field-start' and `widget-field-end'. For the foreground and
background color fields I typically get within `widget-before-change'
#<overlay from 1031 to 1044 in *Customize Face: isearch*>
#<overlay from 1083 to 1093 in *Customize Face: isearch*>
before the notification and
#<overlay from 1083 to 1096 in *Customize Face: isearch*>
#<overlay from 1135 to 1145 in *Customize Face: isearch*>
after. The difference is 52 as expected, hence these positions should
get relocated correctly.
The problem is that the FROM value of `widget-after-change' now points
into the foreground overlay and the TO value into the background
overlay. I typically get FROM = 1090 and TO = 1143. As a consequence,
`widget-after-change' concludes that I have edited two different fields
and throws an error. I suppose this happens because signal_after_change
is called with arguments `opoint' and `PT - opoint' where opoint = 1090
and PT = 1090 + 52 + 1.