[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious fontification/C++ context issue

From: Stefan Monnier
Subject: Re: Mysterious fontification/C++ context issue
Date: Sun, 10 Dec 2006 20:23:01 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

>> If there is bad fontification for only one file in Emacs, out of the
>> universe of C files, why not set open-paren-in-column-0-is-defun-start
>> to be nil for that file, using a file-local variable?

> It would be simpler to make syntax.c obey the coding standard by
> removing the conflicting open paren in column zero.  Alas, the problem
> is merely ideological: If we abandon the standard, people will more
> frequently write files that don't obey the open paren in column zero
> convention.  I think:

> - Programmers should avoid putting open parens in column zero unless
>   these start a defun.  To enforce this behavior, major modes should
>   always issue a warning by highlighting such parens (where "always"
>   means "as long as the according coding standard persists").

I disagree in general.  What I agree to is that programmers should avoid
putting things that look like defuns inside comments and strings.

I.e. in Lisp, an open-paren-in-col0 is indeed a bad idea.  In C it's not
a problem (maybe an open-brace-in-col0 is a problem there, but not an open


reply via email to

[Prev in Thread] Current Thread [Next in Thread]