From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Davin Pearson Newsgroups: gmane.emacs.bugs Subject: C++ indentation bug Date: Sat, 05 Feb 2005 18:43:22 +1300 Message-ID: <42045CFA.2080200@student.canterbury.ac.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1107582353 23071 80.91.229.2 (5 Feb 2005 05:45:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Feb 2005 05:45:53 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 05 06:45:53 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxIkL-0003Uh-Gh for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Feb 2005 06:44:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxIy0-0000nf-MP for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Feb 2005 00:58:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxIxf-0000bB-7L for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2005 00:58:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxIxa-0000Xs-7h for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2005 00:58:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxIxa-0000Xb-33 for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2005 00:58:22 -0500 Original-Received: from [132.181.2.27] (helo=cantva.canterbury.ac.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxIjD-0000Xs-Sl for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2005 00:43:32 -0500 Original-Received: from CONVERSION-A1.it.canterbury.ac.nz by it.canterbury.ac.nz (PMDF V6.2-X27 #30791) id <01LKGER1D3ZKIGE098@it.canterbury.ac.nz> for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2005 18:43:28 +1300 (NEW ZEALAND DAYLIGHT TIME) Original-Received: from [192.168.0.61] (63.reserved.callplus.net.nz [203.100.216.63]) by it.canterbury.ac.nz (PMDF V6.2-X27 #30791) with ESMTPA id <01LKGEQZET84IGEAP0@it.canterbury.ac.nz> for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2005 18:43:27 +1300 (NEW ZEALAND DAYLIGHT TIME) Original-Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.8.3]); Sat, 05 Feb 2005 18:43:24 +1300 Original-To: bug-gnu-emacs@gnu.org X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geb-bug-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.bugs:10677 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:10677 This bug report will be sent to the Free Software Foundation, not to your local site managers!! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. In GNU Emacs 20.7.1 (i386-*-nt5.1.2600) of Wed Jun 14 2000 on buffy configured using `configure NT' Please describe exactly what actions triggered the bug and the precise symptoms of the bug: This is the second time I have submitted this bug report. This time I have isolated the bug to a single line containing //* According to the fontification, this starts a single line // comment, but according to indent-region and c-indent-command, this starts a multi-line /* ... */ comment. /// /// This file is a demonstration of a /// bug in the commands /// /// indent-region and c-indent-command /// /// of Gnu Emacs. /// /// I have deleted /// as much as I could from this /// file to mimimise the work needed /// from an Emacs Lisp programmer to /// find the bug. /// /// The programming /// language used is C++. /// /// The bug is in the indentation /// of the line following the #endif /// /// The bug appears to be /// cause by the slash-slash-star comment /// line inside the blit /// statement. /// int main() { for (;;) { blit(0, 0,//* ); switch (foo) { case KEY_P: { #ifdef NDEBUG bar(); #endif /* NDEBUG */ /// /// The indentation on the next line is wrong... /// } } } } /// /// end of file /// Recent input: down down down down down up up up up up up up up S-left S-left S-right SPC s l a s h - s l a h backspace s g backspace h - s t a r down M-q home f2 f2 f2 C-g down down down down down down down down down down end left S-left down down down down down down down down down down down down down down end up S-left S-right S-left end down down down down down down down down down down down down down S-left S-left home f2 f2 insert C-g menu-bar help-menu report-emacs-bug Recent messages: TAB runs the command c-indent-command Beginning of buffer [3 times] Wrote d:/zallegro/2005/tests/t-17-indentation-bug.cc Quit Wrote d:/zallegro/2005/tests/t-17-indentation-bug.cc (No files need saving) [2 times] Quit (No files need saving) [2 times] <<< Press Return to bury the buffer list >>> Quit -- Davin Pearson http://www.geocities.com/davin_pearson -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 31/01/2005