all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Warren L Dodge <warrend@Tektronix.com>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: perl-mode problem in C-x ;  comment-set-column
Date: Wed, 26 Sep 2007 16:09:36 -0400	[thread overview]
Message-ID: <jwvsl51p556.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200709250312.l8P3Cc51002230@lwe127084.cse.tek.com> (Warren L. Dodge's message of "Mon\, 24 Sep 2007 20\:12\:38 -0700")

> I use the C-x ; runs the command comment-set-column command to format my
> comments in the perl code I write. I have noticed in the last couple of years
> of moving up to emacs-22.0.990 that the consistant operation I observed back
> in 21.3 is gone. I usually put this line at the top of the file

> # -*-mode: Perl; fill-column: 180; comment-column: 101; -*-

> I then do a code macro to search for a # and do <esc>; to set the comments
> position across the entire buffer. Many of the line align properly. Many do
> not. In one file I shortened the comment back to position 60. Someof the
> lines stayed out at 101. I then went in and remove all of the spaces between
> the ; .. # and reexecuted the <esc>; and the comment moved out to 60.

The comment column is now chosen in a more complex manner to try and keep
comments within reasonable columns and to try and align them together.
So basically the rule is now something like:

1 - we first try and make sure that comments to not pass comment-fill-column,
    so long comments may ignore comment-column.
2 - try to align the comment to another comment on the previous line
    (assuming this is possible within the constraints given in (1) as well
    as the constraints imposed by the rest of the text on the line).
3 - if (2) is not applicable use the column closest to comment-column within
    the constraints given in (1).

In the trunk, the rules have been slightly refined as far as number 2 goes,
to try and maximize the number of cases where (2) applies.

So my guess is that you have comments longer than 80 columns, which hence
can't be placed at column 101 because they'd go past fill-column (which is
what comment-fill-column default to).


        Stefan

  reply	other threads:[~2007-09-26 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25  3:12 perl-mode problem in C-x ; comment-set-column Warren L Dodge
2007-09-26 20:09 ` Stefan Monnier [this message]
2007-09-26 20:40   ` Warren L Dodge
2007-09-27 20:46     ` Stefan Monnier
2007-09-28 19:03       ` Richard Stallman
2007-09-28 20:20         ` 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=jwvsl51p556.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=warrend@Tektronix.com \
    /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.