all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: kai.grossjohann@uni-duisburg.de (Kai Großjohann)
Subject: Re: Strange line-wrapping
Date: Wed, 13 Nov 2002 08:51:36 +0100	[thread overview]
Message-ID: <84r8dpnbzr.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: aqrd38$bne78$1@ID-135043.news.dfncis.de

Fredrik <nospam-foberg@yahoo.com> writes:

> But if ther is a comment before the line to wrap, I get the following 
> result:
>
> //----------
> //Comment
> //----------
> int Method(int parameter1, int  <---- automatic wrap
> //parameter2, int parameter3)   <---- now this is a comment!
> {
> }
>
>
> ie the comment-signs (//) is added to the new line. 
>
> Can someone explain this?

Explanation is easy: Emacs takes the fill prefix (the "//" is a fill
prefix) from the second line of each paragraph.  That way, you can do
stuff like the following

        Look, this is a paragraph where the first line is indented
    eight spaces and all subsequent lines are indented four spaces.
    I can just keep on typing and the indentation will be correct.
    The four spaces that get inserted automatically in front of each
    line are the fill prefix.

> And how do I solve it?

Tell Emacs that each non-comment line is the start of a new
paragraph: see variable paragraph-start, and also paragraph-separate,
perhaps. 

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

  reply	other threads:[~2002-11-13  7:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-12 17:17 Strange line-wrapping Fredrik
2002-11-13  7:51 ` Kai Großjohann [this message]
2002-11-13 21:48   ` Fredrik
2002-11-14 16:22     ` Kai Großjohann

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=84r8dpnbzr.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@uni-duisburg.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.