emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 29c360e: Ensure redisplay after "C-x C-e"


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 29c360e: Ensure redisplay after "C-x C-e"
Date: Fri, 06 Nov 2015 10:30:51 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> That's always been the case for setting line-spacing.
> No, it worked correctly before Emacs 24.4, according to my testing.

Yes, but that was an accident.  I think what you did is add an arbitrary
hack to paper over this, and I think it'd be better to do it either of:
- live with the apparent regression, telling users that they should
  simply be happy to have enjoyed this accident in the past.
- fix it "right".  E.g. add ad-hoc code to redisplay_internal that tries
  to detect changes to this variable, or add a "write barrier" on that
  variable, or deprecated the `line-spacing' variable in favor of
  a `set-line-spacing' function (thus providing the write-barrier), ...

> Probably because we used to trigger thorough redisplay "for other
> reasons".

Exactly.  People you did this and got the redisplay properly refreshed
were just lucky.

If you fix this case in the way you did, then I see no reason not to
go further down that road and just always redisplay all mode-lines, on
the off-chance that the user set line-spacing, or toggled a minor mode
variable without calling something like force-mode-line-update, set
a variable `toto' which happens to be used by one of the (:eval...)
nodes of the mode-line-format of some of the displayed buffers, ...

> Why should we care about performance of "C-x C-e"?

Why not?  I just think your addition of force-mode-line-update will be
wasted work in 99.9% of the cases, and it will only cover very few of
the cases where a force-mode-line-update is needed.


        Stefan


PS: I even several times found that the "lucky accident" which causes
the mode-line to be recomputed after things like M-: is a mis-feature
because it doesn't let me know when a call to force-mode-line-update
is needed.



reply via email to

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