bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ auto indentation


From: Davin Pearson
Subject: C++ auto indentation
Date: Fri, 28 Jan 2005 18:27:51 +1300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707

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:

I am writing a computer game in C++
and while doing so I noticed a bug
in the Emacs auto-indentation.

The bug is also manifested in the
forward-sexp/backward-sexp functionality.

Here is the file so you can fix
the bug:

To see how the bug happens, try
running the command indent-region
of the source file.

///
/// This file is a demonstration of a
/// bug in the auto indentation feature
/// 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 seems to be in the
/// #ifdef ... #endif lines
///

int main()
{
  for (;;) {

     {
        blit(global_persistent_bitmap,
             global_memory_buffer_bitmap,
0,//*global_blackwell_start_pixel_x.get_element_at(0) - GLOBAL_TILE_SIZE, GLOBAL_BLACKWELL_START_PIXEL_Y - GLOBAL_TILE_SIZE - GLOBAL_CONSOLE_HEIGHT_PIXELS, 0,//*global_blackwell_start_pixel_x.get_element_at(0) - GLOBAL_TILE_SIZE, GLOBAL_BLACKWELL_START_PIXEL_Y - GLOBAL_TILE_SIZE - GLOBAL_CONSOLE_HEIGHT_PIXELS,
             global_persistent_bitmap->w,//GLOBAL_ALLWELL_WIDTH_PIXELS,
             GLOBAL_ALLWELL_HEIGHT_PIXELS + GLOBAL_CONSOLE_HEIGHT_PIXELS);

        if (keypressed())
        {
           {
              switch (readkey() >> 8) {
              case KEY_ESC:
                 break;
              case KEY_P:
                 {
#ifdef NDEBUG
                    local_print_sync_used_by_main_loop();
#endif /* NDEBUG */
                }
        break;
              case KEY_SPACE:
                 break;
              }
           }
        }
     }
  }
}

///
/// end of file
///

Recent input:
backspace backspace backspace backspace backspace backspace
backspace backspace p r o g r a m m m backspace i n
g return l a n g ` SPC u s e d SPC i s SPC C = backspace
+ + . f2 C-end up C-home down down down down down down
down down down down end C-end up up up up up up up
up up up up up up up up tab down down tab tab S-left
S-right down down down down down down down down down
down down down down S-left S-right f2 f2 menu-bar help-menu
report-emacs-bug

Recent messages:
Scanning `Tritus-II.cc'
Scanning `zallegro'
Scanning ` *Minibuf-0*'
Scanning `allegro.txt'
Expansion found in 'allegro.txt'
Wrote d:/zallegro/2005/tests/indent-bug.cc
Mark set [3 times]
(No files need saving) [2 times]
Loading emacsbug...
Loading emacsbug...done

--
Davin Pearson                     http://www.geocities.com/davin_pearson





reply via email to

[Prev in Thread] Current Thread [Next in Thread]