GNU bug report logs - #47167
Multi-line comment-region with empty comment-continue

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 15 Mar 2021 17:11:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: "47167 <at> debbugs.gnu.org" <47167 <at> debbugs.gnu.org>
Subject: bug#47167: [External] : bug#47167: Multi-line comment-region with empty comment-continue
Date: Tue, 16 Mar 2021 19:24:47 +0000
> > (Haven't looked at your patch.)
> > Sounds like a reasonable, and useful thing to do.
> >
> > However, `comment-region' also has optional behaviors
> > that involve its use of a prefix arg.  How with those
> > interact with what you propose?  Do they even make
> > sense (e.g. nesting comment levels and unnesting them)?
> 
> With (setq-local comment-style 'extra-line comment-continue ""),
> `comment-region' currently breaks HTML syntax
> because HTML doesn't support nested comments:
> 
> <!--
> <!-- line 1 -->
> <!-- line 2 -->
> <!-- line 3 -->
>   -->
> 
> With the proposed patch, HTML syntax stays valid:
> 
> <!--
> line 1
> line 2
> line 3
>   -->

I see, I guess.  But why change `comment-region',
instead of creating a new command for multi-line
(aka block) commenting?

If there's a bug now (e.g. wrt `comment-continue')
when someone uses `comment-region', then maybe
either that can be fixed (without involving
multiline) or that command can be made to ignore,
DTRT, or raise an error when `comment-continue'
is used.  (Just a wild guess, without looking at
any code.)




This bug report was last modified 4 years and 128 days ago.

Previous Next


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