Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

auto-fill and programming

0 views
Skip to first unread message

Stefan Monnier <foo@acm.com>

unread,
Jun 25, 1999, 3:00:00 AM6/25/99
to

Does anybody have any recommendation on how to setup Emacs for auto-fill
in programming modes ?

The default auto-fill within comments doesn't quite cut it. It
does something like

(* asasgffg sdfgsdfgdsgfsdfhg sdfhg sdhfg dsgh *)
(* skfdjhsdkfgjhsk gsdklghj sdkfjhskgjhsfdkjlgh *)

instead of

(* asdkjhf lksajfh alks hfaklj fhakljshf alk hfkalh
* skdjf haslkfhalkf halksjfdh alkf dhalkjfh sdlkj *)
or
(*
* sldkjh slkdjhslak hslkadjhfklasj hkljash fklajh fkjh
* saldjh falskjfh alkshj akljhg klajsh kljhgf lkjh g
*)

also when the auto-fill function cuts a line, it tends to indent it
improperly. How can I make auto-fill use the indentation engine of
the major mode and use something like the above comment style (if
M-q could work properly in those, it would be even better) ?


Stefan

Dave Love

unread,
Jul 7, 1999, 3:00:00 AM7/7/99
to
>>>>> "SM" == "Stefan Monnier <f...@acm.com>" <monnier+gnu/emacs/help/news/@tequila.cs.yale.edu> writes:

SM> The default auto-fill within comments doesn't quite cut it. It
SM> does something like

SM> (* asasgffg sdfgsdfgdsgfsdfhg sdfhg sdhfg dsgh *)
SM> (* skfdjhsdkfgjhsk gsdklghj sdkfjhskgjhsfdkjlgh *)

It looks as though that SML (?) mode has redefined
`comment-line-break-function' from the default, which I'd expect to
produce

(* asasgffg sdfgsdfgdsgfsdfhg sdfhg sdhfg dsgh

skfdjhsdkfgjhsk gsdklghj sdkfjhskgjhsfdkjlgh *)

SM> instead of

SM> (* asdkjhf lksajfh alks hfaklj fhakljshf alk hfkalh
SM> * skdjf haslkfhalkf halksjfdh alkf dhalkjfh sdlkj *)

Perhaps see `c-comment-line-break-function' in CC mode for a
(customizable) example of that sort of thing.

0 new messages