From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tony Tung Newsgroups: gmane.emacs.bugs Subject: multi-line comments in cc-mode Date: Tue, 3 Jun 2003 19:10:10 +0000 (UTC) Organization: ... Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1054667756 1325 80.91.224.249 (3 Jun 2003 19:15:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2003 19:15:56 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 03 21:15:50 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 19NHGA-0000KL-00 for ; Tue, 03 Jun 2003 21:15:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NHHG-0003mV-Lz for gnu-bug-gnu-emacs@m.gmane.org; Tue, 03 Jun 2003 15:16:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19NHDO-0001nb-KD for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2003 15:12:58 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19NHCF-0000zQ-69 for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2003 15:11:47 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NHBW-0000lY-61 for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2003 15:11:02 -0400 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.20) id 19NHBV-00047v-Nw for gnu-emacs-bug@prep.ai.mit.edu; Tue, 03 Jun 2003 15:11:01 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19NHAw-0000bd-G4 for gnu-emacs-bug@prep.ai.mit.edu; Tue, 03 Jun 2003 15:10:27 -0400 Original-Received: from agate.berkeley.edu ([128.32.206.40]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NHAi-0000Xw-SL for gnu-emacs-bug@prep.ai.mit.edu; Tue, 03 Jun 2003 15:10:12 -0400 Original-Received: from agate.berkeley.edu (localhost.berkeley.edu [127.0.0.1]) by agate.berkeley.edu (8.12.9/8.12.8) with ESMTP id h53JAAWl039416 for ; Tue, 3 Jun 2003 12:10:10 -0700 (PDT) (envelope-from news@agate.berkeley.edu) Original-Received: (from news@localhost) by agate.berkeley.edu (8.12.9/8.12.8/Submit) id h53JAAE1039415 for gnu-emacs-bug@prep.ai.mit.edu; Tue, 3 Jun 2003 12:10:10 -0700 (PDT) Original-To: gnu-emacs-bug@prep.ai.mit.edu Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 50 Original-NNTP-Posting-Host: soda.csua.berkeley.edu Original-X-Trace: agate.berkeley.edu 1054667410 39215 128.32.112.233 (3 Jun 2003 19:10:10 GMT) Original-X-Complaints-To: usenet@agate.berkeley.edu Original-NNTP-Posting-Date: Tue, 3 Jun 2003 19:10:10 +0000 (UTC) User-Agent: slrn/0.9.7.4 (FreeBSD) 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:5225 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5225 Background info: GNU Emacs 21.3.1; cc-mode with auto-fill-mode. c-block-comment-prefix is set to "* " I posted this a few weeks ago to comp.emacs and gnu.emacs.help, but got no responses. I did do a bit more experimentation and got some more data. Hopefully it'll be useful. If I have a comment that looks like this: /* lot's of text here and so forth blah blah blah ... When I reach the fill column, I get: /* lot's of text here and so forth blah blah blah ... * blah blah blah ... This is expected. Since this is the first time the comment block is broken, Emacs doesn't know how to prefix and automagically puts the "* " (from c-block-comment-prefix) in front. All is good. I continue typing and I get: /* lot's of text here and so forth blah blah blah ... * blah blah blah ... blah blah blah blah Wow, not good! How come it didn't understand the prefix from the previous two lines? The odd thing is that if the comment starts in column 1, it works as expected, like this: /* lot's of text here and so forth blah blah blah ... * blah blah blah ... * blah blah blah blah I did a little more experimenting and discovered that if I put two empty lines in the block comment first, it always works correctly. That is, /* * * lot's of text here and so forth blah blah blah ... * blah blah blah will correctly fill to become: /* * * lot's of text here and so forth blah blah blah ... * blah blah blah ... * blah blah blah blah Any ideas? Thanks.