[Top][All Lists]

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

Re: Mysterious fontification/C++ context issue

From: martin rudalics
Subject: Re: Mysterious fontification/C++ context issue
Date: Sun, 10 Dec 2006 10:18:54 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> 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").

- Major modes may try to avoid messing up fontification when they
  encounter a misplaced open paren.  If this slows down fontification,
  it should be a user option, though.

In either case, it'd be advisable to tell users that they may influence
this by setting `open-paren-in-column-0-is-defun-start' accordingly or,
whatever they do has no impact on the major mode's behavior.

reply via email to

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