Subject: Re: bug#50226: 27.1; Fix uncomment-region with space-only comment-continue

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 27 Aug 2021 16:39:46 +0200

Christophe Troestler <[email-masked]> writes:

> In the Emacs development branch, `comment-region-default-1' has been
> fixed to handle the case 'comment-continue' is entirely made of
> whitespace (commit 5c93063129).  However, `uncomment-region-default-1'
> did not receive an appropriate fix as the following test shows:
>
> (let ((comment-style 'multi-line)
>       (comment-continue "   ")
>       (text "  a\n  b"))
>   (equal text
>          (with-temp-buffer
>            (c-mode)
>            (insert text)
>            (comment-region (point-min) (point-max))
>            (uncomment-region (point-min) (point-max))
>            (buffer-string))))
>
> The attached patch fixes that.

Thanks; applied to Emacs 28 (and I added the test as an ert test case).

I forget whether I've asked before:

This change (including the three previous ones) was small enough to
apply without assigning copyright to the FSF, but for future patches you
want to submit, we'd need to get copyright assignment on file.  Would
you be willing to sign such paperwork?

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