From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Mysterious fontification/C++ context issue Date: Sun, 10 Dec 2006 15:30:49 -0500 Message-ID: <87d56rpk7a.fsf@stupidchicken.com> 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> <20061210102249.GA1235@muc.de> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165782665 24053 80.91.229.10 (10 Dec 2006 20:31:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 10 Dec 2006 20:31:05 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 10 21:31:03 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 1GtVKA-0007iZ-6H for ged-emacs-devel@m.gmane.org; Sun, 10 Dec 2006 21:31:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtVK9-0003u6-GN for ged-emacs-devel@m.gmane.org; Sun, 10 Dec 2006 15:31:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GtVJu-0003tG-KN for emacs-devel@gnu.org; Sun, 10 Dec 2006 15:30:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GtVJr-0003rf-8s for emacs-devel@gnu.org; Sun, 10 Dec 2006 15:30:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtVJr-0003rc-39; Sun, 10 Dec 2006 15:30:43 -0500 Original-Received: from [18.19.1.138] (helo=cyd.mit.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GtVJq-0004Z0-7d; Sun, 10 Dec 2006 15:30:42 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 1BD894E458; Sun, 10 Dec 2006 15:30:49 -0500 (EST) Original-To: Alan Mackenzie In-Reply-To: <20061210102249.GA1235@muc.de> (Alan Mackenzie's message of "10 Dec 2006 10\:12\:35 +0100\, Sun\, 10 Dec 2006 10\:22\:49 +0000") 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:63550 gmane.emacs.pretest.bugs:15647 Archived-At: Alan Mackenzie writes: >> 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 [t] for that file, using a file-local variable? > > There will be bad fontification in lots of files. Setting opic0ids to > nil makes Emacs analyse a CC Mode buffer rigorously, correctly and a bit > slowly. Setting it to t does a rough and ready job which sometimes gives > wierd results. > > With Martin Rudalics's optimisation to c-beginning-of-defun-raw, I don't > feel that the slowness is too bad any more (though he does ;-). The slowdown has been a big distraction for me. As I understand, in CC mode the o-p-i-c-0-i-d-s variable is only relevant for Emacs hackers. Now: - If o-p-i-c-0-i-d-s is t, some Emacs source files may get misfontified. But as Martin has pointed out, we can tweak these files to follow the o-p-i-c-0-i-d-s standard. Thus no problem. - If o-p-i-c-0-i-d-s is nil, there's just no way to avoid a noticeable slowdown in the bigger Emacs source file. So let's make o-p-i-c-0-i-d-s default to t for the release. If someone later comes up with a clever c-beginning-of-defun function, we can switch it back. In any case, could someone check in Martin's optimization to c-beginning-of-defun-raw, or send me the patch with a changelog so that I can check it in?