Subject: Re: bug#65246: comment-or-uncomment-region breaks buffer-undo-list on visiting file

From: Eli Zaretskii <[email-masked]>
Date: Sat, 12 Aug 2023 16:39:47 +0300

merge 65246 64989
thanks

> From: Rittwik Chatterjee <[email-masked]>
> Date: Sat, 12 Aug 2023 19:01:17 +0530
> 
> Subject: 29.1; comment-or-uncomment-region breaks buffer-undo-list on visiting file
> Date: Sat, 12 Aug 2023 18:58:00 +0530
> Message-ID: <[email-masked]>
> --text follows this line--
> 
> 1. emacs -Q
> 2. C-x C-f and visit any file
> 3. select any region (using mouse or keyboard)
> 4. M-x comment-or-uncomment-region
>    I get the message "combine-change-calls: buffer-undo-list broken"
> 
> Interstingly, if I select anything in scratch buffer and run comment-or-uncomment-region everything is
> fine.
> It seems that the bug is affecting only when I am visiting a "real" file.

This is a duplicate of a known bug#64989.  We are currently discussing
how best to fix it and in which version of Emacs.

Thanks.