Subject: bug#35191: 27.0.50; undo of comment-region signals error (when comment-combine-change-calls=t)

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 02 Feb 2021 15:43:00 +0100

Noam Postavsky <[email-masked]> writes:

>> Save the file below and then open it as follows:
>
> It's enough to use a single line
>
>     foo ;; bar
>
> in emacs-lisp-mode.  And the problem only happens with
> comment-combine-change-calls set to t (the default).
>
>>     % emacs -Q ..../zones.el
>>     C-M-f C-M-b                   ;; Move before first form
>>     C-M-SPC M-;                   ;; Comment out first form
>>     C-x u                         ;; Undo last change
>>
>> When I do that, I see an error message in the echo area that says:
>>
>>     Changes to be undone by function different than announced

I'm unable to reproduce this on the trunk (or in Emacs 27.1) -- because 

>>     C-M-SPC M-;                   ;; Comment out first form

doesn't comment anything out (it just moves point to the comment), and
then there's nothing to undo.  Is there something missing in the recipe?  

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