all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Lukasz Stelmach <stlman@poczta.fm>
Cc: 15124@debbugs.gnu.org
Subject: bug#15124: 24.2; comment indentation functions are messed up
Date: Wed, 21 Aug 2013 21:03:39 +0000	[thread overview]
Message-ID: <20130821210339.GA3790@acm.acm> (raw)
In-Reply-To: <521129C1.8020107@poczta.fm>

Hello, Lukasz

On Sun, Aug 18, 2013 at 10:08:33PM +0200, Lukasz Stelmach wrote:
> W dniu 18.08.2013 20:48, Glenn Morris pisze:
> > Łukasz Stelmach wrote:

> >> I've got some problems with making my Emacs insert " *" at the
> >> beginning of a new line of a comment block in cc-mode.

> >> I have found what looks like a little mess-up.

> >> 1. M-j is bound to indent-new-comment-line (an alias for
> >> comment-indent-new-line). Comments at the beginning of the
> >> newcomment.el files say support for consulting
> >> c-comment-line-break-function is yet to be developed.

> >> 2. cc-mode augments (cc-cmds.el) indent-new-comment-line to use
> >> c-indent-new-comment-line unless comment-line-break-function is bound.

> > Which in practice means it does not do this except in very old Emacs
> > versions that are no longer relevant.

> >> 3. This variable is defined and set in simple.el and used in
> >> default-indent-new-line. This however is is not bound to any key so
> >> setting it to c-indent-new-comment-line in a mode hook won't help.


> > Sorry, I can't understand what the bug is supposed to be.

I've fired up "emacs-24.2 -Q", created a new buffer "asdf.c", M-x c-mode.

> Contrary to what the cc-mode info (4.4 Filling and Line breaking) says,
> M-j does not call c-indent-new-comment-line. This makes it impossible,
> like I wrote at the beginnig, to get " *" inserted automatically when
> pressing M-j to end a line when editing a comment. The result is:

When I type in the text below, typing M-j where indicated, I get the
desired " *" on the next line.  When I do C-h c M-j, I get told that M-j
is bound to `c-indent-new-comment-line'.

Questions:
1: Are you certain your buffer was in a CC Mode?  What did you do that
put the buffer into the CC Mode (e.g. C-x C-f foo.c would do it)?  Please
report the actual keystrokes you use.

2: What did you do to determine that M-j was bound to
`indent-new-comment-line'?  Are you sure you were in the CC Mode buffer
when you did this?

3: (If 1: and 2: don't solve the problem), would you please dump out your
CC Mode configuration by C-c C-b and post it here.  Please also tell us
about anything else in your .emacs which might be relevant to the problem.

> /*
>  * Pressing M-j at the end of this line gives
>   only a bad indent at the beginnig of this one. Instead of
>  * the proper prefix which in this case should be " * ".
>  */

Thanks!

> -- 
> Było mi bardzo miło.               Czwarta pospolita klęska, [...]
> >Łukasz<                 Już nie katolicka lecz złodziejska.  (c)PP

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2013-08-21 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-18 11:31 bug#15124: 24.2; comment indentation functions are messed up Łukasz Stelmach
2013-08-18 18:48 ` Glenn Morris
2013-08-18 20:08   ` Lukasz Stelmach
2013-08-21 21:03     ` Alan Mackenzie [this message]
2018-02-14  3:16       ` Noam Postavsky

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=20130821210339.GA3790@acm.acm \
    --to=acm@muc.de \
    --cc=15124@debbugs.gnu.org \
    --cc=stlman@poczta.fm \
    /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.