From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [acm@muc.de: Re: Emacs 22.2 release plans - request for a slight delay.] Date: Mon, 17 Mar 2008 09:37:38 -0400 Message-ID: References: <20080307072737.GA1334@muc.de> <47DD2A9C.70008@gmx.at> <20080316193633.GC1544@muc.de> <47DE1EB9.6070707@gmx.at> <20080317090449.GA2100@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205761112 1650 80.91.229.12 (17 Mar 2008 13:38:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2008 13:38:32 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 17 14:38:50 2008 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 1JbFXj-0006nJ-TF for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2008 14:38:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbFXA-0004Ah-87 for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2008 09:37:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JbFX5-00047V-Hd for emacs-devel@gnu.org; Mon, 17 Mar 2008 09:37:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JbFX2-00043x-QV for emacs-devel@gnu.org; Mon, 17 Mar 2008 09:37:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbFX2-00043e-K4 for emacs-devel@gnu.org; Mon, 17 Mar 2008 09:37:40 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JbFX2-0000DJ-77 for emacs-devel@gnu.org; Mon, 17 Mar 2008 09:37:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4aABYR3kdMCrTo/2dsb2JhbAABpyyBCg X-IronPort-AV: E=Sophos;i="4.25,512,1199682000"; d="scan'208";a="16136848" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 17 Mar 2008 09:37:39 -0400 Original-Received: from pastel.home ([76.10.180.232]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id XQC01039; Mon, 17 Mar 2008 09:37:39 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B14C68F79; Mon, 17 Mar 2008 09:37:38 -0400 (EDT) In-Reply-To: <20080317090449.GA2100@muc.de> (Alan Mackenzie's message of "Mon, 17 Mar 2008 09:04:49 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:92827 Archived-At: > I think the answer to this is to write the following in cc-cmds.el: > (defun c-defun-name (&optional pos) > "Return the name of the current function, or the one at POS. > \"Function\" here means any named structure with a brace block, and > \"current\" means the one surrounding point, starting or terminating at > point. > If there is no current function, return nil." > ..... > ) > That should reduce the above `add-change-log-entry''s time to ~ 1 second. It would be good to move all the code relating to c-mode (and derivatives) from add-log.el to cc-mode.el. > > I'm puzzled that (parse-partial-sexp (point-min) (point-max)) completes > > instantaneously here (without any paren/brackets limits). > Isn't there some sort of cacheing of p-p-s? No. `syntax-ppss' does such caching (and uses pps), but pps doesn't. So syntax-ppss would be even faster in normal use (where the cache is already filled because font-lock uses it). Stefan