[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp primitives and their calling of the change hooks
From: |
Stefan Monnier |
Subject: |
Re: Lisp primitives and their calling of the change hooks |
Date: |
Sun, 07 Jan 2018 14:04:46 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> I think only the former makes sense, because this function is actually
> a replacement function.
When we perform a "replacement" from Elisp, we do it with insert +
delete-region so there are two calls to each of b-c-f and a-c-f.
So two calls also makes sense.
We could even have one call to at the beginning b-c-f followed by two
calls to a-c-f (one right after inserting the new text and one after
deleting the old text). That would also be acceptable.
And in reality, this choice doesn't really matter (as evidenced by the
fact that noone noticed those calls were missing until now).
We should just pick the one that's easier to implement (and in case we
still a preference because the implementation is just as easy, the
"single calls to b-c-f/a-c-f" is of course the better option).
> 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.
In practice, I'd also expect both b-c-f and a-c-f to be nil (or
equivalent) when we call zlib-decompress-region.
Stefan
- Re: Lisp primitives and their calling of the change hooks, (continued)
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/06
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/06
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/07
- [SUSPECTED SPAM] Re: Lisp primitives and their calling of the change hooks, Stefan Monnier, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Stefan Monnier, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks,
Stefan Monnier <=
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/07
- Re: Lisp primitives and their calling of the change hooks, Alan Mackenzie, 2018/01/08
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/08
- Re: Lisp primitives and their calling of the change hooks, Stefan Monnier, 2018/01/08
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/08
- Re: Lisp primitives and their calling of the change hooks, Stefan Monnier, 2018/01/09
- Re: Lisp primitives and their calling of the change hooks, Eli Zaretskii, 2018/01/09