bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: CC Mode 5.28 (Java); The comment fill for auto-fill mode does not wo


From: John Lusk 4
Subject: re: CC Mode 5.28 (Java); The comment fill for auto-fill mode does not work properly when inside Java classes
Date: Fri, 16 May 2003 13:34:45 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507

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.


--- ../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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]