bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#11165: 24.0.95; c-indent-new-comment-line bug or feature?


From: Alan Mackenzie
Subject: bug#11165: 24.0.95; c-indent-new-comment-line bug or feature?
Date: Thu, 17 May 2012 10:12:05 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Leo.

On Thu, May 17, 2012 at 03:19:56PM +0800, Leo wrote:
> On 2012-05-16 00:50 +0800, Alan Mackenzie wrote:
> > I don't think this is a bug.  When you've read that manual page, would
> > you please check exactly what you've done, and whether your buffer
> > indents as we both would like.

> I have read the manual before and I just read it again. Here is a
> detailed recipe to reproduce:

> 1. Emacs -q
> 2. Make a new buffer named BUG and enable c-mode in it
> 3. C-c C-o and customise syntactic 'c' to 4 in BUG buffer
> 4. Now typing in the BUG buffer slash star /*, then press M-j
> 5. type TAB to indent

Thanks for this clarification.

[ .... ]

> The bug is M-j (c-indent-new-comment-line) indents to the wrong column.

Yes, indeed.  In c-indent-new-comment-line there are some lines of code
which prevent point ending up further to the right than its starting
point.  This was to fix a bug in which, after M-; M-j, point ended up
too far to the right.  The fix was erroneous.

This code was committed on 2007-02-15, so it doesn't count as a
regression in the sense of the Emacs 24 release.  So even though the fix
shouldn't be too difficult, it isn't the most urgent thing at the
moment.  I'll get it fixed in CC Mode standalone and the Emacs trunk
sometime.

In the meantime, a workaround is to type <tab> after each M-j,
irritating though this may be.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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