From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.devel Subject: Re: Mysterious fontification/C++ context issue Date: Mon, 11 Dec 2006 02:36:39 -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> <457D0779.5080206@gmx.at> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165822618 19250 80.91.229.10 (11 Dec 2006 07:36:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Dec 2006 07:36:58 +0000 (UTC) Cc: Alan Mackenzie , Chong Yidong , emacs-pretest-bug@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Mon Dec 11 08:36:55 2006 Return-path: Envelope-to: gebp-emacs-pretest-bug@gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GtfiV-00046I-IA for gebp-emacs-pretest-bug@gmane.org; Mon, 11 Dec 2006 08:36:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtfiV-0003zT-3x for gebp-emacs-pretest-bug@gmane.org; Mon, 11 Dec 2006 02:36:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GtfiN-0003zE-LX for emacs-pretest-bug@gnu.org; Mon, 11 Dec 2006 02:36:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GtfiN-0003yy-8Y for emacs-pretest-bug@gnu.org; Mon, 11 Dec 2006 02:36:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtfiL-0003yh-IH; Mon, 11 Dec 2006 02:36:41 -0500 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GtfiK-0002te-Mr; Mon, 11 Dec 2006 02:36:40 -0500 Original-Received: from pastel.home ([70.55.82.240]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061211073639.PPEM5067.tomts5-srv.bellnexxia.net@pastel.home>; Mon, 11 Dec 2006 02:36:39 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 55C477F62; Mon, 11 Dec 2006 02:36:39 -0500 (EST) Original-To: martin rudalics In-Reply-To: <457D0779.5080206@gmx.at> (martin rudalics's message of "Mon\, 11 Dec 2006 08\:23\:37 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for CVS Emacs." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.pretest.bugs:15667 gmane.emacs.devel:63575 Archived-At: >> I disagree in general. What I agree to is that programmers should avoid >> putting things that look like defuns inside comments and strings. > Commented-out code may look like a defun. Indeed, so programmers should be careful to comment out in a way that makes it not look like a defun. That's generally more or less true of code commented out with M-x comment-region. >> 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). > The Emacs manual states > In modes where `open-paren-in-column-0-is-defun-start' is `t', > *don't put an opening delimiter at the left margin unless it is a defun > start*. > and you say `open-paren-in-column-0-is-defun-start' is obsolete ;-) Well I didn't say it's obsolete: I said I'd like to declare it obsolete (but that'll require a few changes). Note that its current effect is extremely minor anyway (it only adds "^\\|" to defun-prompt-regexp and slightly tweaks the way back_comment deals with worst-case scenarios). > BTW, in Elisp an open bracket in column zero of a string should not > confuse Emacs. Yet you highlight it with `font-lock-warning-face'. Indeed, it *shouldn't*, but it does confuse Emacs, which is why it's highlighted ;-(. We should fix it so it doesn't confuse Emacs any more (and doesn't get highlighted either). Stefan