Subject: Re: bug#38316: 26.1; Undo with undo-inhibit-record-point set doesn't restore unmodified state

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 01 Nov 2020 15:50:36 +0100

Braun Gábor <[email-masked]> writes:

> 1. Start Emacs:
>
> emacs -Q --eval '(setq undo-inhibit-record-point t)'
>
> I see the scratch buffer with -- in the modeline indicating it is not 
> modified.
>
> 2. Enter 'abc' in the scratch buffer: press keys a b c.
>
> 3. Press C-_.
>
> The inserted 'abc' is deleted, but in the modeline I see ** indicating
> that the buffer is modified.  The expectation is that the buffer is no
> longer modified.

I can confirm that this bug is still present in Emacs 28.

> Do the same as above but start Emacs with 'emacs -Q', no additional
> options.  Now after C-_ I see -- in the modeline indicating that the
> buffer is not modified, as expected.

Yup.  (The bug report then goes on to discuss the differences in
buffer-undo-list, which is probably the cause of this bug.)

Does anybody have any insight here into what's going wrong here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no