From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: M-q on comments in source code
Date: Sat, 24 May 2014 15:47:14 +0300 [thread overview]
Message-ID: <83tx8fjqct.fsf@gnu.org> (raw)
In-Reply-To: <87ppj3csrk.fsf@yun.yagibdah.de>
> From: lee <lee@yun.yagibdah.de>
> Date: Sat, 24 May 2014 13:37:03 +0200
>
> modes like c-mode indent comments with the code, which is fine as an end
> result and not so ideal when writing them. To give an example:
>
>
> ,----
> | if(full)
> | {
> | //
> | // A max value might be removed when the arrays are shifted. In
> | // that case, find a new one after shifting. Otherwise, the max
> `----
>
>
> Now press M-q to format the comment and the above looks like this:
>
>
> ,----
> | if(full)
> | {
> | //
> | // A max value might be
> | // removed when the arrays are
> | // shifted. In that case,
> | // find a new one after
> | // shifting. Otherwise, the
> | // max continues to be known.
> `----
>
>
> This formatting is a bit silly ... What can I do to get the comments
> formatted as in the first example, i. e. the comment indented with the
> source but with each line trimmed to a length of about max 75
> characters, not counting the indentation?
One way is to set fill-column to a larger value.
next prev parent reply other threads:[~2014-05-24 12:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-24 11:37 M-q on comments in source code lee
2014-05-24 12:47 ` Eli Zaretskii [this message]
2014-05-24 14:21 ` Stefan Monnier
2014-05-24 18:00 ` lee
2014-05-24 18:50 ` Stefan Monnier
2014-05-24 23:01 ` solved: " lee
2014-05-24 15:41 ` Andreas Röhler
2014-05-24 17:32 ` lee
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=83tx8fjqct.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.
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).