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: Tue, 15 May 2012 16:50:39 +0000	[thread overview]
Message-ID: <20120515165038.GB20152@acm.acm> (raw)
In-Reply-To: <m1bomqpijj.fsf@gmail.com>

Hello, Leo.

On Tue, Apr 17, 2012 at 09:57:52PM +0800, Leo wrote:
> On 2012-04-17 18:53 +0800, Alan Mackenzie wrote:
> > I think you've missed out some steps here.  When I do exactly that, I do
> > M-x c-mode on the opening splash screen (which isn't sensible), which is
> > read-only, preventing step 4.

> > What I tried was, instead of your step 4, creating a new buffer with C-x
> > b asdf.c, then setting the mode with M-x c-mode.

> Sorry for the splash screen. What you did instead is correct.

> > I do indeed see point at column 2, which is correct.  I think you might
> > have set the offset for "c" to 4 before creating the empty C buffer.
> > Indentation configuration is buffer local.

> > When I then repeat the C-c C-o c <ret> 4 <ret> I then get the second line
> > at offset 4, where it ought to be.

> I customise "c" after entering C mode so the customisation is effective.
> If you type M-j after /*, point is moved to the newline with 2 leading
> spaces. Now if you type TAB, it will go to column 4. so M-j is
> misbehaving i.e. it doesn't go to the right indentation.

> In contrast, M-x indent-new-comment-line following /* will move point to
> column 4 in the next line.

This is getting confusing.  I'm asking you at this point to read the
chapter "Config Basics" of the CC Mode manual.  About 36 lines down from
the top, it explains how setq'ing/customizing CC Mode's style variables
interacts with loading a buffer.

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.

If it still seems wrong, could you give the exact description of how to
create the problem starting from emacs -Q (yes, I know this'll involve
some repetition).

Thanks!

> Leo

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2012-05-15 16:50 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 [this message]
2012-05-17  7:19       ` Leo
2012-05-17 10:12         ` Alan Mackenzie
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=20120515165038.GB20152@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).