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 23:38:54 -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> <87k611uflz.fsf@stupidchicken.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165811962 30795 80.91.229.10 (11 Dec 2006 04:39:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Dec 2006 04:39:22 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, cyd@stupidchicken.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 11 05:39:18 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 1Gtcwf-0007oF-9k for ged-emacs-devel@m.gmane.org; Mon, 11 Dec 2006 05:39:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gtcwe-0002nn-Sf for ged-emacs-devel@m.gmane.org; Sun, 10 Dec 2006 23:39:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GtcwS-0002nY-0p for emacs-devel@gnu.org; Sun, 10 Dec 2006 23:39:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GtcwP-0002nH-Ab for emacs-devel@gnu.org; Sun, 10 Dec 2006 23:39:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtcwP-0002nE-4m; Sun, 10 Dec 2006 23:39:01 -0500 Original-Received: from [209.226.175.188] (helo=tomts25-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GtcwK-0008RB-6R; Sun, 10 Dec 2006 23:38:56 -0500 Original-Received: from pastel.home ([70.55.82.240]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061211043855.BCPW6280.tomts25-srv.bellnexxia.net@pastel.home>; Sun, 10 Dec 2006 23:38:55 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id B96777F62; Sun, 10 Dec 2006 23:38:54 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun\, 10 Dec 2006 20\:05\:26 -0500") 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:63573 gmane.emacs.pretest.bugs:15665 Archived-At: [ Expanding on my previous message ] > Could we revert the change to beginning-of-defun instead? > It seems clearly incorrect for beginning-of-defun to ignore > open-paren-in-column-0-is-defun-start. [ The change I'd like to revert only influences the case where defun-prompt-regexp is nil so the non-nil case is implicitly outside of this discussion] Does it? The docstring doesn't mention anything about it. And really, when defun-prompt-regexp is nil, then beginning-of-defun considers that "defun starts when there is a char with open-parenthesis syntax at the beginning of a line". So if open-paren-in-column-0-is-defun-start is nil, it's hard to figure out what should be considered as a defun start. It's kind of like saying "I won't tell you what it is, I'll just tell you that it's not what you think". Note that open-paren-in-column-0-is-defun-start is only used in back_comment in syntax.c (where we should remove it by making back_comment use syntax-ppss) and in beginning-of-defun where it was only used to add the empty string to defun-prompt-regexp. > For what other reason does C mode set open-paren-in-column-0-is-defun-start? Maybe because in C defuns do not start with a paren (neither in column 0 nor elsewhere)? Or maybe because Alan uses beginning-of-defun for something for which it was not designed, and thus ends up having to work around beginning-of-defun's functionality by first setting open-paren-in-column-0-is-defun-start and defun-prompt-regexp to some usually unused combination and then putting the code he really wants to use in beginning-of-defun (whereas he should just use this code directly without going through beginning-of-defun)? [ I know this sounds like I'm accusing Alan of plotting. I'm not. ] Stefan