GNU bug report logs - #3370
23.0.94; `comment-region' indents comment chars inappropriately

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 24 May 2009 22:40:04 UTC

Severity: wishlist

Tags: wontfix

Done: Glenn Morris <rgm <at> gnu.org>

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: "'Dan Nicolaescu'" <dann <at> ics.uci.edu>, "'Jason Rumney'" <jasonr <at> gnu.org>
Cc: "'Chong Yidong'" <cyd <at> stupidchicken.com>,
        <3370 <at> debbugs.gnu.org>, <rms <at> gnu.org>,
        "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Subject: bug#3370: 23.0.94;	`comment-region' indents comment chars  inappropriately
Date: Mon, 25 May 2009 00:02:02 -0700
> 'indent was also the preference of the person that wrote the new
> incarnation of the region indent code and who explicitly approved the
> change: Stefan.

`comment-region' is not, or at least was not, about indenting. It is about
commenting out the code in the region.

There is nothing in the Elisp manual about `comment-region'. What there is about
it in the Emacs manual does not mention at all how it affects indenting or is
affected by indenting, and it does not mention `comment-style' at all.

The only mention of indenting in a node that talks also about `comment-region'
is the mention that lines with multiple comment delimiters can sometimes be
indented differently, depending on the number of comment delimiters. That has
always been the case in Emacs (;;; vs ;; vs ; - indented differently by TAB or
C-M-q etc.). Previously, there was no relation between `comment-region' and
indenting, AFAIK. And there is still no documented relation, that I can find.

Finally, the doc string for `comment-region' still says exactly what it said for
Emacs 22. And it says that it comments (or uncomments) "each line" in the
region. Not just some text in the line, starting after some whitespace, but the
(whole) line. And it says nothing about indenting the commented line.

And it says, "By default, comments start at the left margin". Admittedly, that
is vague and could be interpreted to mean different things. But there is
definitely no mention that `comment-region' indents lines that it comments, that
is, that it produces an indented comment.




This bug report was last modified 13 years and 94 days ago.

Previous Next


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