From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Lusk 4 Newsgroups: gmane.emacs.bugs 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 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3EC52135.2050107@ahnlusk.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080200040209050808000300" X-Trace: main.gmane.org 1053106957 9019 80.91.224.249 (16 May 2003 17:42:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 16 May 2003 17:42:37 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 16 19:42:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19GjAD-00024Q-00 for ; Fri, 16 May 2003 19:38:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Gj9I-0006C8-04 for gnu-bug-gnu-emacs@m.gmane.org; Fri, 16 May 2003 13:37:40 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19Gj8e-0005fI-00 for bug-gnu-emacs@gnu.org; Fri, 16 May 2003 13:37:00 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19Gj8I-0005QC-00 for bug-gnu-emacs@gnu.org; Fri, 16 May 2003 13:36:39 -0400 Original-Received: from [64.132.109.4] (helo=cinderella.canopysystems.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Gj6N-0004Wg-00 for bug-gnu-emacs@gnu.org; Fri, 16 May 2003 13:34:39 -0400 Original-Received: from ahnlusk.net (W-JL06072001 [192.168.0.175]) byMail Service Version 5.5.2655.55) id K6HH7NPH; Fri, 16 May 2003 13:34:49 -0400 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507 X-Accept-Language: en-us, en Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5086 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5086 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-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs --------------080200040209050808000300--