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: Alan Mackenzie
Subject: Re: Lisp primitives and their calling of the change hooks
Date: Sun, 7 Jan 2018 11:36:28 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Stefan.

On Sat, Jan 06, 2018 at 20:24:03 +0000, Alan Mackenzie wrote:
> On Sat, Jan 06, 2018 at 10:51:30 -0500, Stefan Monnier wrote:
> > > I've found a discrepancy.  Just one.  In (transpose-regions 1 10 11 20),
> > > the hook calls are, in order, ((1 10) (11 20) (1 20 19)).  The two
> > > consecutive b-c-f's happen when the two regions are of equal size and
> > > non-contiguous.

> > Sounds like a bug alright.

> > > The cause of this is not hard to find: in Ftranspose_region, editfns.c
> > > L5204, there are two calls to modify_text on consecutive lines.  This
> > > seems to be some sort of optimisation.  It is not done elsewhere in
> > > Ftranspose_region.  I dare say this could be fixed easily.

> > Feel free to fix it (on master).

> Done.

> [ .... ]

> >         Stefan

I've just taken the liberty of fixing (in master) another such bug in
base64-decode-region, where the a-c-f call after a text insertion was
missing.

I'm aware of exactly one further bug of this nature: in
zlib-decompress-region, there are no calls to the change hooks at all.
To fix this would be somewhat more involved.  Should it be fixed?

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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