all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
Subject: Re: C comments change from emacs 20
Date: Thu, 2 Jun 2005 20:26:42 +0000	[thread overview]
Message-ID: <22qn7d.36.ln@acm.acm> (raw)
In-Reply-To: 429ca18e_3@news1.prserv.net

kgold <kgold@watson.ibm.com> wrote on 31 May 2005 17:40:30 GMT:
> Alan Mackenzie <acm@muc.de> writes:
>> kgold <kgold@watson.ibm.com> wrote on 20 May 2005 13:19:27 GMT:
>> > In C mode, the continuation line for comments after a blank line
>> > doesn't indent in 21.3.  It did in 20.7.  How can I get the 20.7,
>> > IMHO correct, behavior.

>> > /* In emacs 21.3

>> > Here's where the next line starts, not indented
>> > */

>> > /* In emacs 20.7

>> >    It starts here, indented
>> > */

>> Well, when I start Emacs 21.3 without my .emacs, I get the the result
>> you want, not the one you get.  If you start with  emacs -q
>> --no-site-file, what happens then?  If that works OK, chances are
>> you've got some setting in your .emacs (or site-start.el) which is
>> upsetting the comment indentation.

>> If this is the case, try doing C-c C-b (`c-submit-bug-report') to get
>> about 91 lines dump of CC Mode's internal configuration.  If that doesn't
>> help you get sorted out, post the dump here.

> Thanks for the reply.  It fails for me with -q --no-site-file on both
> Linux and AIX emacs 21.3.  

> Did you notice the blank 2nd line?  That is:

> /* Without a blank line
>    the next line indents
> */

No, I didn't notice it.  Sorry.  And now that I have noticed it, I get
the same effect as you do.

Emacs 20.7 had CC Mode 5.25 (I think), and Emacs 21.3 has CC Mode 5.28.
Adaptive filling was introduced into CC Mode in version 5.26.  This might
have something to do with the problem.

> /* With a blank next line
>
> this line doesn't indent.
> */

The indentation of C-style comment continuation lines (ones with /* ...
*/) is usually done by the function c-lineup-C-comments, and at a guess,
it is indenting a line to the same degree as the previous line, rather
than the previous none-blank line.

I'll take a closer look at this function sometime soon.  I think it could
well be a sub-optimal feature in CC Mode which could do with improvement.
I don't see any quick way of fixing it right now.

You might want to submit this as a request to the CC Mode mailing list on
<bug-cc-mode@gnu.org>.  So might I!

Sorry I can't offer anything better.

> Ken Goldman   kgold@watson.ibm.com   914-784-7646

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

      reply	other threads:[~2005-06-02 20:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 13:19 C comments change from emacs 20 kgold
2005-05-27 18:23 ` Alan Mackenzie
2005-05-31 17:40   ` kgold
2005-06-02 20:26     ` Alan Mackenzie [this message]

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

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

  git send-email \
    --in-reply-to=22qn7d.36.ln@acm.acm \
    --to=acm@muc.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.