emacs-devel
[Top][All Lists]
Advanced

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

Why buffer_shared is a mistake


From: Dmitry Antipov
Subject: Why buffer_shared is a mistake
Date: Thu, 06 Dec 2012 20:02:30 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Look at the screenshot. Here 'A' is an overlay highlighted with 
font-lock-keyword-face
in buffer *scratch*. What happens if I type C-x C-e (eval-last-sexp) staying  
where the
cursor is?

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.

Dmitry

Attachment: redisplay.png
Description: PNG image


reply via email to

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