Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ames!ucbcad!ucbvax!renoir.Berkeley.EDU!john From: john@renoir.Berkeley.EDU.UUCP Newsgroups: comp.emacs Subject: how does one customize C comments in GNU emacs? Message-ID: <17060@ucbvax.BERKELEY.EDU> Date: Tue, 27-Jan-87 00:48:11 EST Article-I.D.: ucbvax.17060 Posted: Tue Jan 27 00:48:11 1987 Date-Received: Tue, 27-Jan-87 19:42:38 EST Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: john@renoir.Berkeley.EDU.UUCP (John Coker) Organization: University of California, Berkeley Lines: 34 Summary: how do you customize C comments? I've been fiddling with my c-mode-hook for a while and have just given up on it. Has anyone coerced GNU emacs into a comment style like the one I use or know how to do it? /* * I like my C comments to look like this. Note that I start the * text on the second line of the comment, not the first line * with the "/*". Also, I like TWO spaces before the text begins * after the asterisk. */ When I try to fill this ``paragraph'', emacs insists that I have the text begin on the first line, and that I only have one space between the asterisk and the text, rendering the above paragraph as: /* I like my C comments to look like this. Note that I start the * text on the second line of the comment, not the first line * with the "/*". Also, I like TWO spaces before the text begins * after the asterisk. */ Another annoying problem is that when I type ``/ * RET'' to begin a block comment, I get positioned on the next line one column past the asterisk on the previous line. Why not below the previous asterisk so I can type another, or even better, have it type the ``SPC * SPC SPC'' for me at the beginning of the line? I've put these lines in my c-mode-hook, but they don't seem to affect things. I must be missing something here. (setq fill-prefix " * ") (setq comment-start "/*\n * ") (setq comment-start-skip "/\\*+\n \\*+")