[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why buffer_shared is a mistake
From: |
Eli Zaretskii |
Subject: |
Re: Why buffer_shared is a mistake |
Date: |
Sat, 08 Dec 2012 15:58:12 +0200 |
> Date: Thu, 06 Dec 2012 20:02:30 +0400
> From: Dmitry Antipov <address@hidden>
> CC: Eli Zaretskii <address@hidden>
>
> 1) Redisplay is invoked with "xaxa" as current_buffer, and buffer_shared is
> recalculated
> to 2 because "xaxa" is displayed in 2 windows. On leaving
> redisplay_internal, buffer_shared
> is 2.
>
> 2) modify_overlay is called for "*scratch*", and this function still sees
> buffer_shared as 2
> (unchanged since last redisplay invocation), although *scratch* is
> displayed in the only
> window.
>
> 3) ???
>
> IIUC, as the minimum minorum, buffer_shared should be reset to 0 after
> leaving redisplay_internal.
> Or it should be a per-buffer field.
buffer_shared is used only by xdisp.c, with the single exception of
modify_overlay. How about changing modify_overlay to compute this
value by itself?
IOW, I think modify_overlay shouldn't have used that variable to
begin with. It's an internal variable used by the display engine.