all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@IRO.UMontreal.CA>
Cc: 'Dan Nicolaescu' <dann@ics.uci.edu>,
	'Chong Yidong' <cyd@stupidchicken.com>,
	rms@gnu.org, 3370@emacsbugs.donarmstrong.com
Subject: bug#3370: 23.0.94; `comment-region' indents comment chars  inappropriately
Date: Mon, 25 May 2009 10:42:05 -0700	[thread overview]
Message-ID: <2425239E1D3C418886AD82BF7680D4BF@us.oracle.com> (raw)
In-Reply-To: <jwvy6sl4880.fsf-monnier+emacsbugreports@gnu.org>

> Emacs put the comment-starters at column-0 because that code 
> was written a looooonnng time ago and keeping things simple
> was more important than now.

Emacs Lisp files still use ;; in column 0 in file headers, AFAICT. What column
would you prefer to indent them to?

That is exactly the use case here: commenting a line that will be in a file
header. There is nothing in the surrounding code that would indicate an
indentation level (other than 0 indent).

> Emacs-21's new commenting code was improved to be able to
> comment and uncomment at other columns than column-0, 

I have no problem with that.

> which made it more useful since most commenting styles use
> other indentation styles.

No idea what that means. Please define "commenting style" and "indentation
style" or otherwise explain what you're trying to say here.

> Emacs-21's default (as well as 22) was set to `plain' because Richard
> always puts such comments at column-0 (the `plain' setting 
> had actually to be added specifically for this).

Well I don't always put "such comments" (depending on what you mean by that) at
column 0. I put `;;' comments where Emacs has always put them: at the same level
of indentation that TAB puts code.

This is about commenting out a region, however, not about inserting a comment at
the current indentation level. 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'

> If you don't like it, just (setq comment-style 'plain) and 
> live happily ever after.

Done (just let-bound in the pertinent code context). That's all I needed.

I would prefer, however, to _understand_, by getting some information about
`comment-style', `comment-styles', etc. Please document `comment-style' and the
rest of what might be missing. Please document this change in NEWS also.

Thx.







  reply	other threads:[~2009-05-25 17:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24 23:31 bug#3370: 23.0.94; `comment-region' indents comment chars inappropriately Chong Yidong
2009-05-24 23:57 ` Drew Adams
2009-05-25  0:04 ` Lennart Borgman
2009-05-25  0:54   ` Chong Yidong
2009-05-25  1:28     ` Jason Rumney
2009-05-25  2:09       ` Drew Adams
2009-05-25  4:47       ` Chong Yidong
2009-05-25  7:01         ` Drew Adams
2009-05-25 13:27           ` Chong Yidong
2009-05-25 17:42             ` Drew Adams
2009-05-25 13:38           ` Stefan Monnier
2009-05-25 17:42             ` Drew Adams [this message]
2009-05-25 21:22               ` Stefan Monnier
2009-05-25 21:56                 ` Drew Adams
2009-05-25 22:46                 ` Jason Rumney
2009-05-26  1:16                   ` Stefan Monnier
2012-02-22  2:46                     ` Glenn Morris
2009-05-25  5:26       ` Dan Nicolaescu
2009-05-25  7:02         ` Drew Adams
2009-05-25 13:30           ` Chong Yidong
2009-05-25 13:39           ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2009-05-24 22:31 Drew Adams
2009-05-25 13:41 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2425239E1D3C418886AD82BF7680D4BF@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=3370@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=dann@ics.uci.edu \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.