GNU bug report logs - #23785
Emacs 25: "Undo" overdoes things.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 17 Jun 2016 15:03:01 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: phillip.lord <at> russet.org.uk (Phillip Lord)
Cc: acm <at> muc.de, 23785 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#23785: Emacs 25: 'Undo' overdoes things.
Date: Mon, 20 Jun 2016 10:04:01 -0400
> I don't understand why you say this. AFAICT, the problem is that the
> buffer-undo-list doesn't have a nil after the command has happened.

Hmm... I thought I had seen a trace showing that there was a nil before
the revert-buffer that then disappeared.  But it looks like
I misremember.  Sorry.

> I think that it does -- it calls "insert_from_buffer" which then calls
> "prepare_to_modify_buffer".
> I *think* what is happening is that prepare_to_modify_buffer is being
> called when buffer-undo-list is specbound to t -- hence the change does
> not register as undoable change.

That would be a good explanation, indeed.  So I guess your patch is the
right fix.  Thank you.


        Stefan




This bug report was last modified 4 years and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.