[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undo weirdness with insert-file-contents
From: |
martin rudalics |
Subject: |
Re: undo weirdness with insert-file-contents |
Date: |
Thu, 28 Feb 2008 10:56:59 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
I looked at the C code for insert-file-contents, and its handling of the
undo list looks pretty messy, it seems to be saving it and restoring
multiple times (sometimes nested?) using multiple methods of restoring
the old value....
... which is messy because I tried to avoid that intermediate steps of the
decoding process show up in the undo-list. Please try the attached patch.
*** fileio.c.~1.602.~ Thu Feb 14 20:41:44 2008
--- fileio.c Thu Feb 28 10:41:36 2008
***************
*** 4772,4778 ****
--- 4772,4783 ----
/* In the non-visiting case record only the final insertion. */
current_buffer->undo_list =
Fcons (Fcons (lbeg, lend), Fcdr (old_undo));
+ eles
+ current_buffer->undo_list =
+ Fcons (Fcons (lbeg, lend), old_undo);
}
+ else
+ current_buffer->undo_list = old_undo;
}
else
/* If undo_list was Qt before, keep it that way.
- undo weirdness with insert-file-contents, Miles Bader, 2008/02/28
- Re: undo weirdness with insert-file-contents,
martin rudalics <=
- Re: undo weirdness with insert-file-contents, Miles Bader, 2008/02/28
- Re: undo weirdness with insert-file-contents, martin rudalics, 2008/02/28
- Re: undo weirdness with insert-file-contents, Stefan Monnier, 2008/02/28
- Re: undo weirdness with insert-file-contents, martin rudalics, 2008/02/28
- Re: undo weirdness with insert-file-contents, Miles Bader, 2008/02/28
- Re: undo weirdness with insert-file-contents, martin rudalics, 2008/02/28
- Re: undo weirdness with insert-file-contents, Stefan Monnier, 2008/02/28
- Re: undo weirdness with insert-file-contents, martin rudalics, 2008/02/28
Re: undo weirdness with insert-file-contents, Glenn Morris, 2008/02/28