Subject: 24.3.50; cc-mode; indent line fails with wrong-type-argument stringp nil

From: Darren Hoo <[email-masked]>
Date: Thu, 1 Aug 2013 23:40:53 +0800

start with emacs -Q  (bzr version : revno: 113634)

Open a simple C file:

1  void main(){
2  int a;
3  }

put the point on line 2 and press TAB brings this backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  c-after-conditional()
  c-guess-basic-syntax()
  c-indent-line()
  #[nil "\302\303 !\210\304>\203.\212\305 \210\306\307x\210\305
\210\310 )i\310 X\203'\311 !\202,\212\311 !))\207 \207"
[indent-line-function column syntax-propertize line-end-position
(indent-relative indent-relative-maybe) beginning-of-line "\n " nil
current-indentation indent-line-to] 2 2087357 nil]()
  c-indent-command(nil)
  c-indent-line-or-region(nil nil)
  call-interactively(c-indent-line-or-region nil nil)
  command-execute(c-indent-line-or-region)