🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189237

Re: fill-paragraph and programming languages with comments

#189237
From: Ethan Bradford
Date: Tue, 16 Apr 1991 17:50
24 lines
1608 bytes
In article <9104132008.AA16883@husc10.harvard.edu> carlton@HUSC10.HARVARD.EDU (david carlton) writes:
>Has anybody hacked fill-paragraph to work well in the presence of
>comments?  For example, if I am editing some Scheme code and hit M-q
>in the middle of the comment
>
>; aoeu oaeu euoa oaeusnaoenhtsueoa uaeon htuaeo nuaeon ueosnoensenuotsah aoeu
>; aosneutheou
>
>I want to see
>
>; aoeu oaeu euoa oaeusnaoenhtsueoa uaeon htuaeo nuaeon
>; ueosnoensenuotsah aoeu aosneutheou
>
>instead of
>
>; aoeu oaeu euoa oaeusnaoenhtsueoa uaeon htuaeo nuaeon
>ueosnoensenuotsah aoeu ; aosneutheou

Just set your fill prefix to "; ".  You could make fill prefix be
automatically set from the comment prefix when you enter your language
modes.

This will also automatically add "; " to the start of a new line if
auto-fill mode breaks your line.
Technical Details
Message-ID: <1991Apr16.175025.25268@milton.u.washington.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!unidui!math.fu-berlin.de!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ns.uoregon.edu!milton!ethanb
References: <9104132008.AA16883@husc10.harvard.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,4609b729e0c12482
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-04-16 23:19:05 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!unidui!math.fu-berlin.de!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ns.uoregon.edu!milton!ethanb
From: ethanb@milton.u.washington.edu (Ethan Bradford)
Newsgroups: gnu.emacs.help
Subject: Re: fill-paragraph and programming languages with comments
Keywords: fill prefix, comment
Message-ID: <1991Apr16.175025.25268@milton.u.washington.edu>
Date: 16 Apr 91 17:50:25 GMT
References: <9104132008.AA16883@husc10.harvard.edu>
Organization: University of Washington, Seattle
Lines: 24
Cc: carlton@HUSC10.HARVARD.EDU