From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Matthew Stallman Newsgroups: gmane.emacs.devel Subject: Re: narrow-to-defun and mark-defun now work properly for CC Mode. Date: Wed, 11 Apr 2007 19:04:19 -0400 Message-ID: References: <20070409123730.GD1065@muc.de> <87lkgypz1w.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1176332823 1532 80.91.229.12 (11 Apr 2007 23:07:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2007 23:07:03 +0000 (UTC) Cc: acm@muc.de, david.hansen@gmx.net, emacs-devel@gnu.org, fx@gnu.org, sorourke@cs.ucsd.edu To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 12 01:06:58 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hbltx-0006t1-Ix for ged-emacs-devel@m.gmane.org; Thu, 12 Apr 2007 01:06:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hbly3-0005ny-2A for ged-emacs-devel@m.gmane.org; Wed, 11 Apr 2007 19:11:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hblxx-0005hu-6P for emacs-devel@gnu.org; Wed, 11 Apr 2007 19:11:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hblxw-0005gB-7D for emacs-devel@gnu.org; Wed, 11 Apr 2007 19:11:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hblxv-0005fV-Ex for emacs-devel@gnu.org; Wed, 11 Apr 2007 19:11:03 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hbltp-0003fL-4m for emacs-devel@gnu.org; Wed, 11 Apr 2007 19:06:49 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HblrP-000497-CV; Wed, 11 Apr 2007 19:04:19 -0400 In-reply-to: <87lkgypz1w.fsf@stupidchicken.com> (message from Chong Yidong on Wed, 11 Apr 2007 14:04:59 -0400) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:69318 Archived-At: The trouble is that font-lock uses {beginning/end}-of-defun-function. Because c-{beginning/end}-of-defun-function is slow (which is apparently unavoidable due to syntactic complications), it makes font-lock unacceptably slow (> 20 seconds for M-> in xdisp.c). I see an easy solution: make font-lock use the old code which CC mode formerly used, but keep the new code for interactive use of C-M-h. Having narrow-to-defun including the function header would be nice, but if no solution to the slowness problem arises quickly, I think this change should be postphoned to post-22. It is a mistake to TALK about giving up before investigating possible easy solutions such as the one I suggested above.