GNU bug report logs - #50226
27.1; Fix uncomment-region with space-only comment-continue

Previous Next

Package: emacs;

Reported by: Christophe Troestler <christophe.troestler <at> umons.ac.be>

Date: Fri, 27 Aug 2021 14:29:01 UTC

Severity: normal

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 50226 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Christophe Troestler <christophe.troestler <at> umons.ac.be>
Cc: 50226 <at> debbugs.gnu.org
Subject: Re: bug#50226: 27.1; Fix uncomment-region with space-only
 comment-continue
Date: Fri, 27 Aug 2021 16:39:46 +0200
Christophe Troestler <christophe.troestler <at> umons.ac.be> 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




This bug report was last modified 3 years and 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.