GNU bug report logs - #63761
PATCH: Add commands for commenting/uncommenting rectangles

Previous Next

Package: emacs;

Reported by: Okamsn <okamsn <at> protonmail.com>

Date: Sat, 27 May 2023 22:07:01 UTC

Severity: wishlist

Tags: patch

Full log


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

From: Okamsn <okamsn <at> protonmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: PATCH: Add commands for commenting/uncommenting rectangles
Date: Sat, 27 May 2023 22:06:20 +0000
[Message part 1 (text/plain, inline)]
Hello,

This patch adds commands for commenting rectangles and modifies 
`comment-dwim` to use them. This is useful, for example, for commenting 
out the middles of consecutive lines, for which `comment-region` 
wouldn't work. It does this by calling `comment-region` or 
`uncomment-region` on each segment within the rectangle. With this patch,

	word1 word2 word3
	word4 word5 word6

would become

	word1 /* word2 */ word3
	word4 /* word5 */ word6

instead of

	word1 /* word2 word3
	word4 word5 */ word6

as produced by `comment-region` when using `rectangle-mark-mode`.

Thank you.
[0001-Add-commands-for-commenting-uncommenting-non-contigu.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 351 days ago.

Previous Next


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