unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why buffer_shared is a mistake
@ 2012-12-06 16:02 Dmitry Antipov
  2012-12-08 13:58 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Antipov @ 2012-12-06 16:02 UTC (permalink / raw)
  To: Emacs development discussions; +Cc: Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

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 #2: redisplay.png --]
[-- Type: image/png, Size: 36204 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-10  8:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-06 16:02 Why buffer_shared is a mistake Dmitry Antipov
2012-12-08 13:58 ` Eli Zaretskii
2012-12-10  7:29   ` Dmitry Antipov
2012-12-10  8:18     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).