From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: perl-mode problem in C-x ; comment-set-column Date: Thu, 27 Sep 2007 16:46:51 -0400 Message-ID: References: <200709250312.l8P3Cc51002230@lwe127084.cse.tek.com> <200709262040.l8QKen6B032305@lwe127084.cse.tek.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1190926040 8327 80.91.229.12 (27 Sep 2007 20:47:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Sep 2007 20:47:20 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: warren.l.dodge@tektronix.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 27 22:47:16 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ib0GP-0005dq-A1 for ged-emacs-devel@m.gmane.org; Thu, 27 Sep 2007 22:47:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ib0GM-0006jP-1L for ged-emacs-devel@m.gmane.org; Thu, 27 Sep 2007 16:47:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ib0GA-0006gI-Ui for emacs-devel@gnu.org; Thu, 27 Sep 2007 16:46:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ib0G9-0006fb-Bp for emacs-devel@gnu.org; Thu, 27 Sep 2007 16:46:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ib0G9-0006fV-84 for emacs-devel@gnu.org; Thu, 27 Sep 2007 16:46:57 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ib0G8-0007Ul-Tp for emacs-devel@gnu.org; Thu, 27 Sep 2007 16:46:56 -0400 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ib0FQ-0000aY-Fq for emacs-pretest-bug@gnu.org; Thu, 27 Sep 2007 16:46:12 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ib0G6-0007UN-0G for emacs-pretest-bug@gnu.org; Thu, 27 Sep 2007 16:46:56 -0400 Original-Received: from vpn-132-204-232-106.acd.umontreal.ca ([132.204.232.106] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ib0G5-0007U9-Q3 for emacs-pretest-bug@gnu.org; Thu, 27 Sep 2007 16:46:53 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 19933B4062; Thu, 27 Sep 2007 16:46:51 -0400 (EDT) In-Reply-To: <200709262040.l8QKen6B032305@lwe127084.cse.tek.com> (Warren L. Dodge's message of "Wed\, 26 Sep 2007 13\:40\:49 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Linux 2.6 (newer, 3) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79965 gmane.emacs.pretest.bugs:20023 Archived-At: > If you take the file I send as is and do > emacs-22.0.990 -Q filename > C-x(C-s#;C-aC-nC-x) > I.E. define a macro to search for #, stop the search, do ; , 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