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, Eli Zaretskii <eliz <at> gnu.org>, 23785 <at> debbugs.gnu.org
Subject: bug#23785: Emacs 25: 'Undo' overdoes things.
Date: Tue, 21 Jun 2016 17:25:29 -0400
> +      /*
> +        Temporarily enable the undo-buffer to ensure that the change
> +        is marked as an undoable one. Bug #23785.
> +       */
> +      bset_undo_list(current_buffer,Qnil);

Additionally to Eli's remark about the shape of your comments, please
also put spaces before open parens and after commas.

>        insert_from_buffer (XBUFFER (conversion_buffer),
>  			  same_at_start_charpos, inserted_chars, 0);
> +      bset_undo_list(current_buffer,Qt);

Instead of two bset_undo_list, you could use a single specbind since the
above code is almost immediately followed by unbind_to.

But more seriously, I'm wondering: where is undo-list set to t (and
hence causing the problem we're seeing)?
Searching for "undo" in that function gives m the impression that
undo-0list won't be set to t during the call to insert_from_buffer.
What am I missing?


        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.