emacs-devel
[Top][All Lists]
Advanced

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

Re: insert-file-contents disables undo


From: martin rudalics
Subject: Re: insert-file-contents disables undo
Date: Thu, 24 Jul 2008 23:34:02 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>>Thanks for finding that!  I don't immediately see the reason for the bug
>>in `insert-file-contents'; that function's handling of the undo list is
>>a huge festering pile of hair...
>
> Hmm... but isn't that pile of hair the immediate reason for the bug?

The immediate reason is that I forgot that record_insert would collapse
the insertion done by `insert-file-contents' with other insertions.
AFAICT Andreas fixed that and also the mindless one-armed `if' I wrote.
Thanks, Andreas!

Anyway, the pile of hair is rooted deep inside `insert-file-contents'
which tries to reconcile format decoding, `after-insert-file-functions',
keeping the undo-list short and `point' where it was, and whatever have
you.  `insert-file-contents' presently has about 1200 lines of code,
that's clearly too much for my brain.

martin





reply via email to

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