Subject: bug#23785: Emacs 25: 'Undo' overdoes things.

From: Stefan Monnier <[email-masked]>
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