emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: perl-mode problem in C-x ; comment-set-column


From: Stefan Monnier
Subject: Re: perl-mode problem in C-x ; comment-set-column
Date: Thu, 27 Sep 2007 16:46:51 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> If you take the file I send as is and do
> emacs-22.0.990  -Q filename
> C-x(C-s#<cr><esc>;C-aC-nC-x)

> I.E. define a macro to search for #, stop the search, do <esc>; , and then
> move to the next line beginning.

> Then execute that macro for the whole buffer you will see (at least I do )
> that the lines do not change

Oh, yes I see it now.  The explanation for the behavior is that it prefers
to align with a comment on the next line (or previous line, but the crucial
part is that it also looks at the next), so it will tend to align comments
on successive lines together rather than align them with comment-column.

This has been fixed on the trunk where M-; still looks at subsequent lines
to try and make sure blocks of comments can be aligned, but where M-;
doesn't actually align with subsequent lines, only with the previous line.

Maybe this change should be backported to the 22 branch?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]