From: Richard S. <rm...@gn...> - 2003-05-18 12:22:22
|
I think this is for you. ------- Start of forwarded message ------- Date: Fri, 16 May 2003 13:34:45 -0400 From: John Lusk 4 <joh...@ah...> X-Accept-Language: en-us, en To: bug...@gn... Subject: re: CC Mode 5.28 (Java); The comment fill for auto-fill mode does not work properly when inside Java classes Sender: bug-gnu-emacs-bounces+rms=gn...@gn... This is a multi-part message in MIME format. - --------------080200040209050808000300 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This is in response to an ancient post I saw in the archives. I have the same problem. When I went to the cc-mode project on SourceForge, I see they haven't created any downloadable releases past 5.28 (although there's plenty of discussion of 5.29 and 5.30 on their list). Apart from the fact that our local sysadmin has cut off the CVS port with the firewall, I'm not real enthusiastic about snagging a CVS snapshot. So, here's a (no doubt crude, brutal) patch for the cc-mode distributed w/emacs 21.2 that seems to work for me. (Hmm. Dumb ol' Mozilla wants to wrap. I'll try attaching the diff.) John. - --------------080200040209050808000300 Content-Type: text/plain; name="cc-cmds.5.28.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cc-cmds.5.28.patch" - --- ../lisp/progmodes/cc-cmds.el 2001-07-16 02:46:48.000000000 -0400 +++ cc-cmds.el 2003-05-16 11:31:30.000000000 -0400 @@ -2425,7 +2425,8 @@ ;; we're on the first line in a block comment so it'll be ;; wrong. Ignore it to guess a better one below. (setq fill-prefix nil) - - (when (and (eq c-lit-type 'c++) + (when (and (or (eq c-lit-type 'c++) + (eq c-lit-type 'c)) (not (string-match "\\`[ \t]*//" (or fill-prefix "")))) ;; Kludge: If the function that adapted the fill prefix ;; doesn't produce the required comment starter for line - --------------080200040209050808000300 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Bug-gnu-emacs mailing list Bug...@gn... http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs - --------------080200040209050808000300-- ------- End of forwarded message ------- |