Subject: Re: bug#66334: 29.1.50; Undoing uncomment-region leaves buffer modified
From: Eli Zaretskii <[email-masked]>
To: martin rudalics <[email-masked]>
Cc: [email-masked]
Date: Wed, 04 Oct 2023 19:37:21 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Wed, 4 Oct 2023 11:29:30 +0200
> From: martin rudalics <[email-masked]>
> 
> When with Emacs 29 I make a file /home/martin/temp/foobar.el with the
> following contents
> 
> 
> ;; uncomment this line via C-. then undo
> 
> (find-file "/home/martin/temp/foobar.el")
> 
> (defun my-uncomment-region ()
>    (interactive)
>    (uncomment-region
>     (point-at-bol) (progn (forward-line) (point))))
> 
> (global-set-key [(control .)] 'my-uncomment-region)
> 
> 
> 
> run
> 
> emacs -Q --load "/home/martin/temp/foobar.el"
> 
> and type C-. followed by C-_ the foobar.el buffer remains modified.
> 
> This bug was apparently fixed on master - in reaction to Bug#64989 and
> Bug#60467 I suppose - but seems to persist here on Emacs 29.2.  Note
> that in contrast to those bugs no error message gets printed here.

The bug is unfixed on the emacs-29 branch because the fix we installed
on master was deemed unsafe for the release branch, and no safer patch
was brought up.

So I'm closing this bug because at this point I don't think we will
see a patch to fix it that is safe enough for the release branch.