emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master fd8f724: * src/xdisp.c (overlay_arrows_changed_


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master fd8f724: * src/xdisp.c (overlay_arrows_changed_p): Fix last change.
Date: Tue, 28 Feb 2017 15:02:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> But we only care what happens with these between two successive
> redisplay cycles.  What kind of scenario could possibly change that
> variable in more than one buffer?

Here's a situation:

    (with-current-buffer A
      (setq-local overlay-arrow-position (copy-marker 10)))
    (with-current-buffer B
      (setq-local overlay-arrow-position (copy-marker 5)))

after redisplay, what should be the value of

    (get 'overlay-arrow-position 'last-arrow-position)

?  If it's 5 and we perform a redisplay, will buffer A be refreshed even
if no changes occurred in it?

The way I look at it, this code fundamentally assumes that the variables
on that list are not buffer-local (not only because of the use of
global symbol properties but also because it only considers
the value of those vars in the buffer which happens to be current).

Yet:

    % grep -l local.\*overlay-arrow-position **/*.el
    calc/calc.el
    gnus/gnus-sum.el
    mpc.el
    net/rcirc.el
    progmodes/compile.el
    progmodes/python.el
    %

And from my understanding of how this code works, we can both end up
redisplaying unnecessarily, as well as fail to redisplay when needed.


        Stefan




reply via email to

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