From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: Identifying DEFUNs in which-func-mode Date: Wed, 7 Oct 2009 04:44:52 +0200 Message-ID: References: <1254882587.6961.281.camel@projectile.siege-engine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1254883700 24103 80.91.229.12 (7 Oct 2009 02:48:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Oct 2009 02:48:20 +0000 (UTC) Cc: Emacs developers To: eric@siege-engine.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 07 04:48:10 2009 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 1MvMZW-0003GO-1l for ged-emacs-devel@m.gmane.org; Wed, 07 Oct 2009 04:48:10 +0200 Original-Received: from localhost ([127.0.0.1]:40258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvMZV-0006yt-AC for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2009 22:48:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvMWl-0005Y6-7s for emacs-devel@gnu.org; Tue, 06 Oct 2009 22:45:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvMWg-0005Wk-Jt for emacs-devel@gnu.org; Tue, 06 Oct 2009 22:45:18 -0400 Original-Received: from [199.232.76.173] (port=45190 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvMWg-0005Wg-DF for emacs-devel@gnu.org; Tue, 06 Oct 2009 22:45:14 -0400 Original-Received: from mail-fx0-f205.google.com ([209.85.220.205]:54999) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvMWf-0006c7-RA for emacs-devel@gnu.org; Tue, 06 Oct 2009 22:45:14 -0400 Original-Received: by fxm1 with SMTP id 1so3852500fxm.31 for ; Tue, 06 Oct 2009 19:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=jyhBGsUFmD8xLQXpsItnwtCFFP49ESL3HGQ2IAoxV1Y=; b=cA9zoApq48+0neYeoxfhYzbk7FTaEWOHc2scXIRFZbm7oUHasF8rRSv8OSq/91WsPc zMZvW7X7hcjrduw8DYspfCDPSJX+oBM2z4kjlfKRjPt5UEcy2aTDqi7snk+xSqazfJQf ENSBv347s+qZybz01KoBoKchPnDlYIO12JQ1U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=wTdH4FH/8NReea7UWMBEheG/S7I8diPfmsp+dphSyU3Rut/XrPcWKMQfySVBduBQnW 3UPlO18aef8r3jLRqmRmM2wSf0fSMKKvag+Ubpj39EtUrXynjDoKwOXiNizFdBnQTv8t dwFevST2YOSeqEKsD5UKqjr854cbWX57NiBT0= Original-Received: by 10.239.186.147 with SMTP id g19mr180512hbh.210.1254883512165; Tue, 06 Oct 2009 19:45:12 -0700 (PDT) In-Reply-To: <1254882587.6961.281.camel@projectile.siege-engine.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:115944 Archived-At: On Wed, Oct 7, 2009 at 04:29, Eric M. Ludlam wrote: > If you enable semantic-mode in Emacs (via the recent integration) and > also enable EDE (via the integration), then Emacs will identify your > Emacs sources as a project, and setup the parsing system to recognize > DEFUN macros. Interesting. > Anyway, the Semantic parsers put overlays on tags, so looking up which > function you are on is very fast. Cool. There's a comment in which-func.el: ;; TODO LIST ;; --------- ;; [...] ;; 2. This package should be realized with the help of overlay ;; properties instead of imenu--index-alist variable. so it's nice to know Semantic is doing better and faster (not that I doubted it :-) > You can see how the which-func support works at the bottom of this file: > > http://cedet.cvs.sourceforge.net/viewvc/*checkout*/cedet/cedet/semantic/s= emantic-imenu.el > > This support was added a long time ago, and judging by the description > you posted, should be re-written to some new APIs anyway. =C2=A0I'd be gl= ad > to see that old code refreshed as needed, as which-func is exactly the > type of functionality that CEDET excels at. I've just taken a cursory glance, but yes, it seems like the advice stuff for which-func at the end of semantic-imenu.el could be simplified by using which-func-functions. BTW, there's no semantic/imenu.el on the Emacs CVS, nor any reference to which-func in the lisp/cedet/ subtree. Why? > On the flip-side, if you enable the CEDET tools, you could enable > semantic-stickyfunc-mode instead of which-func. =C2=A0IMO this is a much > slicker way of doing the same thing, but only if you don't use your > header line for other tasks already. It's pretty clear that at some not-to-distant future I should take the time to learn about the CEDET tools... All in all, what I proposed could still be useful for developers not wanting to use EDE, etc. But perhaps is just not worth the trouble. Juanma