emacs-devel
[Top][All Lists]
Advanced

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

Re: non-local exits in redisplay


From: Stefan Monnier
Subject: Re: non-local exits in redisplay
Date: Sun, 11 Oct 2020 23:44:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Now the natural follow up question: Is it ok to use the error functions
> which end up calling xsignal in redisplay when one is sure it won't cause
> this sort of infinite loop? In my testing it looks like the error message
> ends up displaying ok, but are there any other gotchas I should look out
> for here?

I think it's pretty risky.  IIRC there are some variables which could
remain in an incorrect state, depending on exactly when the error
is signaled.

Another way to put it is that it can be done, but depending on the
details, it may require some careful investigation to find the variables
which might need extra unwind-protect-style protection.

I think there's also a risk some redisplay may end up not being properly
drawn (e.g. because we signal the error before it's done, but it has
already be removed from the "things which need redisplay").


        Stefan




reply via email to

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