GNU bug report logs - #2436
open-paren-in-column-0-is-defun-start and cc-mode

Previous Next

Packages: cc-mode, emacs;

Reported by: Tom Tromey <tromey <at> redhat.com>

Date: Sun, 22 Feb 2009 18:35:04 UTC

Severity: minor

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: 2436 <at> debbugs.gnu.org
Cc: Tom Tromey <tromey <at> redhat.com>
Subject: bug#2436: cc mode font-locking -vs- multi-line strings
Date: Mon, 03 Oct 2011 15:46:37 -0400
As was pointed out, there is an unescaped left paren in column 0 (at
line 2560). If this is escaped, the problem goes away.

However, there does at least seem to be a documentation bug, because
cc-mode.texi's FAQ says:

    @emph{I have an open paren character at column zero inside a comment or
    multiline string literal, and it causes the fontification and/or
    indentation to go haywire.  What gives?}

    [...]
    This heuristic is built into the core syntax analysis routines in
    (X)Emacs, so it's not really a @ccmode{} issue.  However, in Emacs
    21.1 it became possible to turn it off <at> footnote{Using the variable
    @code{open-paren-in-column-0-is-defun-start}.} and @ccmode{} does so
    there since it's got its own system to keep track of blocks.

However, open-paren-in-column-0-is-defun-start is true in c-mode.
It seems the relevant setting in cc-mode.el was commented out 2006/12/17.




This bug report was last modified 11 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.