* Strange line-wrapping
@ 2002-11-12 17:17 Fredrik
2002-11-13 7:51 ` Kai Großjohann
0 siblings, 1 reply; 4+ messages in thread
From: Fredrik @ 2002-11-12 17:17 UTC (permalink / raw)
Using NTemacs 21.2.1 I have the following problem:
I like to have my code wrapped automatically so I've set c-ignore-auto-
fill to nil which works pretty well. However, there is some strange
behaviour. This works fine:
int Method(int parameter1, int <---- automatic wrap
parameter2, int parameter3)
{
}
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? And how do I solve it?
Regards
//Fredrik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange line-wrapping
2002-11-12 17:17 Strange line-wrapping Fredrik
@ 2002-11-13 7:51 ` Kai Großjohann
2002-11-13 21:48 ` Fredrik
0 siblings, 1 reply; 4+ messages in thread
From: Kai Großjohann @ 2002-11-13 7:51 UTC (permalink / raw)
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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange line-wrapping
2002-11-13 7:51 ` Kai Großjohann
@ 2002-11-13 21:48 ` Fredrik
2002-11-14 16:22 ` Kai Großjohann
0 siblings, 1 reply; 4+ messages in thread
From: Fredrik @ 2002-11-13 21:48 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote in
news:84r8dpnbzr.fsf@lucy.cs.uni-dortmund.de:
>> 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.
Looking up the variables tells me their values are
"[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f"
and
"[ \f]*$"
As my emacs-knowledge is rather limited, I have no idea on how to
interpretate this information. Can anybody help me?
BTW Kai, emacswiki (http://www.emacswiki.org/cgi-bin/wiki.pl?
IndentationTutorial) tells me you have an indentation-tutorial at
http://ls6-www.cs.uni-dortmund.de/~grossjoh/emacs/tutorials.html
When trying to view that page, the server tells me I don't have
permission to access it. Is this correct, i.e. I should not have access
to it, or is there an error?
Regards
/Fredrik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange line-wrapping
2002-11-13 21:48 ` Fredrik
@ 2002-11-14 16:22 ` Kai Großjohann
0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2002-11-14 16:22 UTC (permalink / raw)
Fredrik <nospam-foberg@yahoo.com> writes:
> BTW Kai, emacswiki (http://www.emacswiki.org/cgi-bin/wiki.pl?
> IndentationTutorial) tells me you have an indentation-tutorial at
>
> http://ls6-www.cs.uni-dortmund.de/~grossjoh/emacs/tutorials.html
>
> When trying to view that page, the server tells me I don't have
> permission to access it. Is this correct, i.e. I should not have access
> to it, or is there an error?
I apologize. I've recently changed jobs and getting my web page back
up has had a too low priority to get done already.
First, I was lacking a chair and a desk. Then I was lacking a
pencil. Now I'm still lacking an eraser and a trash can... :-)
kai
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-14 16:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-12 17:17 Strange line-wrapping Fredrik
2002-11-13 7:51 ` Kai Großjohann
2002-11-13 21:48 ` Fredrik
2002-11-14 16:22 ` Kai Großjohann
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).