unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Leo <sdl.web@gmail.com>
Cc: 11165@debbugs.gnu.org
Subject: bug#11165: 24.0.95; c-indent-new-comment-line bug or feature?
Date: Thu, 17 May 2012 10:12:05 +0000	[thread overview]
Message-ID: <20120517101205.GA3323@acm.acm> (raw)
In-Reply-To: <m1txzfnujn.fsf@gmail.com>

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	other threads:[~2012-05-17 10:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 18:30 bug#11165: 24.0.95; c-indent-new-comment-line bug or feature? Leo
2012-04-17 10:53 ` Alan Mackenzie
2012-04-17 13:57   ` Leo
2012-05-15 16:50     ` Alan Mackenzie
2012-05-17  7:19       ` Leo
2012-05-17 10:12         ` Alan Mackenzie [this message]
2019-10-25 20:34 ` Alan Mackenzie
2019-10-26 13:08   ` Leo Liu
     [not found] ` <20191025203405.GA24064@ACM>
2019-10-26 17:08   ` Glenn Morris
2019-10-27 11:32     ` Alan Mackenzie
2019-11-06 16:43       ` Glenn Morris
     [not found]       ` <dpv9rxez0a.fsf@fencepost.gnu.org>
2019-11-06 20:33         ` Alan Mackenzie

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20120517101205.GA3323@acm.acm \
    --to=acm@muc.de \
    --cc=11165@debbugs.gnu.org \
    --cc=sdl.web@gmail.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).