From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw. Date: Sat, 16 Dec 2006 23:02:12 -0500 Message-ID: <87slff6ugr.fsf@furball.mit.edu> References: <45768797.5010106@gmx.at> <20061210014526.GB3738@muc.de> <877ix0lfm8.fsf@furball.mit.edu> <20061210102249.GA1235@muc.de> <87d56rpk7a.fsf@stupidchicken.com> <20061213224009.GA1206@muc.de> <87odq72ssy.fsf@stupidchicken.com> <20061214084713.GA1333@muc.de> <45812BDF.5050107@gmx.at> <4583C7D3.1070703@gmx.at> <45843AA5.5080906@gmx.at> <45844243.4060706@gmx.at> <87hcvvzlco.fsf@stupidchicken.com> <4584500B.7020303@gmx.at> <87d56jzjn3.fsf@stupidchicken.com> <8764cbzg5e.fsf@stupidchicken.com> <458483D2.9020809@gmx.at> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166328173 18020 80.91.229.10 (17 Dec 2006 04:02:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Dec 2006 04:02:53 +0000 (UTC) Cc: martin rudalics , Alan Mackenzie , Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 17 05:02:51 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 1GvnEf-0005Aa-T5 for ged-emacs-devel@m.gmane.org; Sun, 17 Dec 2006 05:02:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvnEf-0005K7-Jn for ged-emacs-devel@m.gmane.org; Sat, 16 Dec 2006 23:02:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GvnEU-0005Jc-3V for emacs-devel@gnu.org; Sat, 16 Dec 2006 23:02:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvnES-0005JU-Qy for emacs-devel@gnu.org; Sat, 16 Dec 2006 23:02:36 -0500 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GvnES-0005oj-91; Sat, 16 Dec 2006 23:02:36 -0500 Original-Received: from central-city-carrier-station.mit.edu (CENTRAL-CITY-CARRIER-STATION.MIT.EDU [18.7.7.72]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id kBH42OsX015317; Sat, 16 Dec 2006 23:02:24 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by central-city-carrier-station.mit.edu (8.13.6/8.9.2) with ESMTP id kBH42I5t026220; Sat, 16 Dec 2006 23:02:18 -0500 (EST) Original-Received: from furball.mit.edu (SYDNEYPACIFIC-FOUR-FORTY.MIT.EDU [18.95.6.185]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id kBH42Ca7010421; Sat, 16 Dec 2006 23:02:13 -0500 (EST) Original-Received: from cyd by furball.mit.edu with local (Exim 3.36 #1 (Debian)) id 1GvnE4-0003g4-00; Sat, 16 Dec 2006 23:02:12 -0500 Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Sat\, 16 Dec 2006 19\:04\:19 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 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:63867 Archived-At: Stefan Monnier writes: >>> I still haven't seen any explanation for why this code needs to be in >>> beginning-of-defun-raw. > >> Well, it doesn't harm either. > > Huh? Have you looked at the beginning-of-defun-raw code before the change > and compared to the monster it has become? All this (apparently) because > cc-mode wants to use syntax-ppss-toplevel-pos via this function rather than > calling it directly? > > I want to remove that code and go back to what it was before, unless I can > find a *good* explanation for why it needs to be in beginning-of-defun-raw. I think one of the reasons it was put in there was because it doesn't look like it belongs in cc-*.el either. Since the code should probably not be deleted outright (it seems to work OK for small files, so individual users might want to turn it on), what about putting in a function, call it "syntax-ppss-beginning-of-defun", in syntax.el?