From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: Strange line-wrapping Date: Wed, 13 Nov 2002 08:51:36 +0100 Organization: University of Dortmund, Germany Sender: help-gnu-emacs-admin@gnu.org Message-ID: <84r8dpnbzr.fsf@lucy.cs.uni-dortmund.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037178181 25827 80.91.224.249 (13 Nov 2002 09:03:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2002 09:03:01 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18BtQI-0006iF-00 for ; Wed, 13 Nov 2002 10:02:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18BtQR-00049Z-00; Wed, 13 Nov 2002 04:03:07 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!lucy.informatik.uni-duisburg.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: lucy.informatik.uni-duisburg.de (134.91.35.216) Original-X-Trace: fu-berlin.de 1037176305 13493184 134.91.35.216 (16 [73968]) User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:sn2Y5L3ueGU0UWKlYIoMlVdu36k= Original-Xref: shelby.stanford.edu gnu.emacs.help:106987 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3541 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3541 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, perhaps. kai -- ~/.signature is: umop ap!sdn (Frank Nobis)