From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Mysterious fontification/C++ context issue Date: Sun, 10 Dec 2006 20:23:01 -0500 Message-ID: References: <87y7po2e9b.fsf@leeloo.anubex.internal> <45741FBE.3000107@swipnet.se> <45742464.1090504@gmx.at> <20061204203024.D17603@colin2.muc.de> <45768797.5010106@gmx.at> <87odqhj89q.fsf@stupidchicken.com> <20061210014526.GB3738@muc.de> <877ix0lfm8.fsf@furball.mit.edu> <457BD0FE.7020005@gmx.at> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165800204 7639 80.91.229.10 (11 Dec 2006 01:23:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Dec 2006 01:23:24 +0000 (UTC) Cc: Alan Mackenzie , Chong Yidong , Richard Stallman , emacs-pretest-bug@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 11 02:23:21 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GtZt1-0001o0-F2 for ged-emacs-devel@m.gmane.org; Mon, 11 Dec 2006 02:23:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtZt0-0000Yn-OO for ged-emacs-devel@m.gmane.org; Sun, 10 Dec 2006 20:23:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GtZsp-0000YJ-Cm for emacs-devel@gnu.org; Sun, 10 Dec 2006 20:23:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GtZsn-0000Xp-UG for emacs-devel@gnu.org; Sun, 10 Dec 2006 20:23:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtZsn-0000Xm-RU; Sun, 10 Dec 2006 20:23:05 -0500 Original-Received: from [209.226.175.34] (helo=tomts13-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GtZsk-0006Sx-LV; Sun, 10 Dec 2006 20:23:02 -0500 Original-Received: from pastel.home ([70.55.82.240]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061211012301.KFCX1773.tomts13-srv.bellnexxia.net@pastel.home>; Sun, 10 Dec 2006 20:23:01 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 43B257F62; Sun, 10 Dec 2006 20:23:01 -0500 (EST) Original-To: martin rudalics In-Reply-To: <457BD0FE.7020005@gmx.at> (martin rudalics's message of "Sun\, 10 Dec 2006 10\:18\:54 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63565 gmane.emacs.pretest.bugs:15662 Archived-At: >> 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 paren). Stefan