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


Message #88 received at 3370 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> IRO.UMontreal.CA>
Cc: <3370 <at> debbugs.gnu.org>,
        "'Chong Yidong'" <cyd <at> stupidchicken.com>,
        "'Jason Rumney'" <jasonr <at> gnu.org>,
        "'Dan Nicolaescu'" <dann <at> ics.uci.edu>, <rms <at> gnu.org>
Subject: RE: bug#3370: 23.0.94; `comment-region' indents comment chars  inappropriately
Date: Mon, 25 May 2009 14:56:37 -0700
> Yes, I know that.
> 
> > Commenting out this line:
> >   `abcdef'
> > gives this, prior to Emacs 23:
> > ;;   `abcdef'
> > Commenting out the line is different from inserting a comment at the
> > same level:
> >   ;;
> >   `abcdef'
> 
> I know.  Yet, most cases of commented-out code would use
> 
>     ;; `abcdef'

No, that was not an example of commenting-out code. It was an example of
inserting a comment - as I said.

> Obviously, you don't like it, just like Richard doesn't like it.  I do
> believe you're in the minority, tho.

No, you're mistaken. I don't really care one way or the other about it.

The information that was missing (and is still missing) is about `comment-style'
and `comment-styles'. You gave me a solution for the code I have, but still no
explanation of `comment-style'. There is still no doc for it.

I don't need to use a different value of `comment-style' for my own use
interactively - I don't really care whether the commented lines are indented or
not. (At least I don't have a preference at the moment.) My question was about
use of `comment-region' in code, not interactively. See the original bug
report's use case.

The real bug I guess is that there is no explanation of `comment-style'.
Whenever things like this change, there is the potential (almost the certainty)
that existing code will break, as it did in my case. My real need, I came to
realize here, is not that `comment-region' act, by default, as it did before,
but that I know how to fix the broken code due to its behavior change. The
answer was to bind `comment-style', as you suggested.

But there is no explanation, hence no understanding, of that answer - no doc for
`comment-style'. And, as I said, the doc string for `comment-style' (which is
pretty much useless) refers to `comment-styles', which is not recognized (and
therefore has no link).





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.