Hello,
c++-mode seems to misinterpret statements like
| if (c<0 || c>99)
as some kind of template specification. With enabled syntax-highlighting
and completion mode, this will lead to severe confusion of the highlighting
system.
E.g. when a file 'foo.cc' contains
int main()
{
if (c<0 || c>99) {}
}
I can reproduce it with:
| $ xemacs -vanilla
| M-x load-library<CR>completion
| select 'Options -> Syntax Highlighting -> In This Buffer' in the menu
| C-x C-f foo.cc
| press 'C-f' subsequently until the '0' will be reached (from
'c<0')
Now, I get:
| (1) (error/warning) Error in `pre-command-hook' (setting hook to nil): (error
Containing expression ends prematurely)
The stack-trace is
| Signaling: (error "Containing expression ends prematurely")
| scan-sexps(22 -1)
| symbol-under-point()
| symbol-under-or-before-point()
| use-completion-under-or-before-point()
| completion-before-command()
It is impossible to insert certain characters (e.g. '=' or ';') here;
with my other settings (sorry, I do not know a minimal setup), the
entire paren-highlighting breaks (expressions keep marked forever).
I am using latest package set (cc-mode 1.40).
Enrico