Package: emacs22-common
Version: 22.2+2-5
Severity: normal

The attached C++ program is indented incorrectly when being typed in. 
It indents correctly when re-opening the complete file.

When I use show-paren-mode, it shows that on the second line of the 
if-statement the < and > are matched, but after completing the '>=' it 
does not match anymore and then a mismatch between the < and the ) is 
created.

Best,
Jaap Eldering

Some (possibly) relevant emacs reportbug output:

Using CC Mode version 5.31.5

In GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-11-09 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 
11.0.10402000
configured using `configure  '--build=i486-linux-gnu' 
'--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' 
'--libexecdir=/usr/lib' '--localstatedir=/var/lib' 
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim'
 
'--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 
'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: POSIX
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: C++/l

Minor modes in effect:
  shell-dirtrack-mode: t
  encoded-kbd-mode: t
  delete-selection-mode: t
  pc-selection-mode: t
  show-paren-mode: t
  recentf-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-bpo.1-686 (SMP w/3 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages emacs22-common depends on:
ii  dpkg                          1.14.25    Debian package management system
ii  emacsen-common                1.4.17     Common facilities for all emacsen

emacs22-common recommends no packages.

Versions of packages emacs22-common suggests:
ii  emacs22-common-non-dfsg       22.2+2-1.1 GNU Emacs shared, architecture ind
ii  emacs22-el                    22.2+2-5   GNU Emacs LISP (.el) files

-- no debconf information
int main()
{
	int x = 1, y = 2, n = 5;

	if ( x<0 || x>=n ||
	     y<0 || y>=n ) return 1;

	     // incorrectly indented here

	return 0;
}

Reply via email to