From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Chen Newsgroups: gmane.emacs.devel Subject: HEAD cc-mode bug: /* */ {} Date: Sat, 31 Jan 2004 00:00:31 -0800 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075536125 24808 80.91.224.253 (31 Jan 2004 08:02:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2004 08:02:05 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jan 31 09:01:58 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Amq4k-0007tR-00 for ; Sat, 31 Jan 2004 09:01:58 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Amq4k-0004RV-00 for ; Sat, 31 Jan 2004 09:01:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Amq4A-0003Cf-SX for emacs-devel@quimby.gnus.org; Sat, 31 Jan 2004 03:01:22 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Amq3w-0003CL-5p for emacs-devel@gnu.org; Sat, 31 Jan 2004 03:01:08 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Amq3P-0002kv-CP for emacs-devel@gnu.org; Sat, 31 Jan 2004 03:01:07 -0500 Original-Received: from [128.32.47.228] (helo=hkn.eecs.berkeley.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Amq3O-0002i6-E7; Sat, 31 Jan 2004 03:00:34 -0500 Original-Received: from quarl by hkn.eecs.berkeley.edu with local id 1Amq3L-0001VF-00; Sat, 31 Jan 2004 00:00:31 -0800 Original-To: Emacs Developement List , bug-cc-mode@gnu.org X-Quack-Archive: 1 User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19592 Dear Emacs, cc-mode developers: I believe this is a bug in cc-mode's c-electric-brace: if you type a brace ('{' or '}') without a preceding newline, any preceding comments are deleted. Steps to reproduce: C-x C-f /tmp/a.c (or .cc, .java, etc) foo // line comment /* block comment */ { Typing the '{' (or '}') deletes the comments such that the buffer now looks like: foo { This occurs with cc-mode 5.30.8 from Emacs CVS HEAD but not in Emacs 21.3. I suppose the fix would be to change the call to `c-backward-syntactic-ws'. -- Karl 2004-01-30 23:46