Subject: bug#16910: 24.3; c++ mode: autoindent stops working

From: [email-masked]
Date: Fri, 28 Feb 2014 11:26:22 -0500

Hi-

While editing files in c++ mode, autoindent sometimes stops working
after a while. Saving, making a trivial change and then immediately
reverting sometimes solves the problem, but usually not. I'm afraid I
can't give a recipe, since I myself don't understand when it happens; it
seems unpredictable. But (some of) the error messages from emacs (which
appear in the echo area) are below.

             -Andrew Warshall

In GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-02-24 on warshall
Windowing system distributor `The X.Org Foundation', version 11.0.11202000
Configured using:
 `configure '--prefix=/usr' '--localstatedir=/var' '--with-gif=no'
 'CFLAGS=-march=amdfam10''

Important settings:
  value of $LANG: en_US.ISO-8859-1
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t

Major mode: C++/l

Minor modes in effect:
  shell-dirtrack-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<right> <right> <right> <right> <right> <left> ) <delete> 
<delete> . <down> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <right> t o _ g e n _ e x p SPC ( <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <delete> <delete> 
) . <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <left> <left> <left> 
<left> t o _ g e n _ e x p SPC ( <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <delete> <delete> . 
) <backspace> <backspace> ) . <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <return> <tab> <tab> <tab> <tab> <tab> <tab> 
<tab> <tab> SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC 
SPC <tab> <tab> <down> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
) <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <emacs-manual-bug> 
<help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-2> <help-echo> <down-mouse-1> <mouse-2> <help-echo> 
<down-mouse-5> <mouse-5> <down-mouse-5> <mouse-5> <down-mouse-5> 
<mouse-5> <down-mouse-5> <mouse-5> <down-mouse-4> <mouse-4> 
<double-down-mouse-4> <double-mouse-4> <triple-down-mouse-4> 
<triple-mouse-4> <help-echo> <down-mouse-1> <help-echo> 
<mouse-movement> <mouse-2> <help-echo> <help-echo> 
<help-echo> <down-mouse-5> <mouse-5> <down-mouse-5> 
<mouse-5> <down-mouse-5> <mouse-5> <down-mouse-5> <mouse-5> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <tool-bar> 
<Exit> <help-echo> C-x C-s SPC <tab> <backspace> <help-echo> 
<menu> r e p o <tab> r <tab> <menu> <return>

Recent messages:
c-parse-state inconsistency at 1692: using cache: ((1415 . 1506) 220), from scratch: nil
Old state:
(setq c-state-cache '((1415 . 1506) 220)  c-state-cache-good-pos 1636  c-state-nonlit-pos-cache '(3001)  c-state-nonlit-pos-cache-limit 1  c-state-semi-nonlit-pos-cache nil  c-state-semi-nonlit-pos-cache-limit 1  c-state-brace-pair-desert '(220 . 322)  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 1764)
c-parse-state inconsistency at 1417: using cache: (1415 (1001 . 1156) 220), from scratch: nil
Old state:
(setq c-state-cache '((1415 . 1506) 220)  c-state-cache-good-pos 1636  c-state-nonlit-pos-cache '(3001)  c-state-nonlit-pos-cache-limit 1  c-state-semi-nonlit-pos-cache nil  c-state-semi-nonlit-pos-cache-limit 1  c-state-brace-pair-desert '(220 . 322)  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 1692)
c-parse-state inconsistency at 1417: using cache: (1415 (1001 . 1156) 220), from scratch: nil
Old state:
(setq c-state-cache '(1415 (1001 . 1156) 220)  c-state-cache-good-pos 1416  c-state-nonlit-pos-cache '(3001)  c-state-nonlit-pos-cache-limit 1  c-state-semi-nonlit-pos-cache nil  c-state-semi-nonlit-pos-cache-limit 1  c-state-brace-pair-desert '(220 . 322)  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 1417)
completing-read-default: Command attempted to use minibuffer while in minibuffer

Load-path shadows:
/usr/share/emacs/site-lisp/t-mouse hides /usr/share/emacs/24.3/lisp/t-mouse

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils jka-compr gud easy-mmode vc vc-dispatcher
misearch multi-isearch ispell sgml-mode skeleton tex-mode shell
pcomplete latexenc make-mode cc-langs cl cl-lib cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
help-mode haskell-mode-autoloads edmacro kmacro imenu info easymenu
package compile comint ansi-color ring paren cus-start cus-load
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)