[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange line-wrapping

From: Kai Großjohann
Subject: Re: Strange line-wrapping
Date: Wed, 13 Nov 2002 08:51:36 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Fredrik <> 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,

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]