[Top][All Lists]

[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: Sun, 07 Jan 2018 19:58:23 +0200

> From: Stefan Monnier <address@hidden>
> Cc: Alan Mackenzie <address@hidden>,  address@hidden
> Date: Sun, 07 Jan 2018 12:50:26 -0500
> >> Should I try to fix zlib-decompress-region?
> > How do you want to fix it?  That function inserts the decompressed
> > stuff, then deletes the original compressed stuff.  What do you want
> > that to produce in terms of the change hooks?
> Either one b-c-f at the beginning and and one a-c-f at the end,
> or one b-c-f/a-c-f pair for the insertion followed by another for
> the deletion.
> It doesn't matter much which.

I think only the former makes sense, because this function is actually
a replacement function.

Also note that zlib-decompress-region works only in unibyte buffers,
so in practice almost every caller will immediately call
decode-coding-region or its ilk, which calls the hooks again.  But
unlike zlib-decompress-region, the decoding stuff will be able to0
report character positions, not byte positions.

reply via email to

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