emacs-devel
[Top][All Lists]
Advanced

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

Re: Lisp primitives and their calling of the change hooks


From: Eli Zaretskii
Subject: Re: Lisp primitives and their calling of the change hooks
Date: Mon, 08 Jan 2018 23:15:11 +0200

> Date: Mon, 8 Jan 2018 19:24:15 +0000
> Cc: address@hidden, address@hidden
> From: Alan Mackenzie <address@hidden>
> 
> > > There is also no a-c-f call if the decompression exits with an error.
> 
> > You mean, if the user quits?  That throws to top level, so it would be
> > wrong to invoke any after-change hooks, and unwind_decompress will
> > call the hooks for the partially uncompressed data.  Do we need more?
> 
> I was thinking more of when the compressed text is corrupt and the
> decompression routines report an error.

What do other primitives do when there's an error?  That was never
reported in this discussion nor discussed, AFAICT.  Up front, I see no
reason to keep any promises when that happens.

> The (1 22016) b-c-f is thus unbalanced when this happens.

If this is really important (and I don't see why it would be), you can
add a call to after-change-hooks before unbind_to of the error return.

> I'm asking you to consider again having two pairs of hook calls in this
> primitive (as, for example, base64-decode-region does).  That way we need
> only signal the b-c-f for the deletion after the decompression has
> worked, and we know we are going to follow through with the deleteion.  I
> think an aborted decompression operation would also be easier to close
> off with an a-c-f with this strategy.

Is implementation convenience the only argument for Stefan's variant?
If so, it doesn't convince me, as the difference is barely tangible.



reply via email to

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