unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Davin Pearson <dmp36@student.canterbury.ac.nz>
Subject: C++ indentation bug
Date: Sat, 05 Feb 2005 18:43:22 +1300	[thread overview]
Message-ID: <42045CFA.2080200@student.canterbury.ac.nz> (raw)

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

                 reply	other threads:[~2005-02-05  5:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42045CFA.2080200@student.canterbury.ac.nz \
    --to=dmp36@student.canterbury.ac.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).