comp.emacs
[Top] [All Lists]

Re: how to find in cc-mode what is the function name at given point

Subject: Re: how to find in cc-mode what is the function name at given point
From: Ted Zlatanov
Date: Fri, 08 Aug 2008 10:22:05 -0500
Newsgroups: comp.emacs

On Thu, 7 Aug 2008 22:01:34 +0000 (UTC) Alan Mackenzie <acm@xxxxxxxxxxxxx> 
wrote: 

AM> No, there is no elegant way.  Only hard graft.  ;-)  The following
AM> function will be appearing in the next release of CC Mode.  If you have
AM> a reasonably recent GNU Emacs (22.1 or later), it should probably
AM> work.  If not, complain!

AM> (defun c-defun-name ()
AM>   "Return the name of the current defun, or NIL if there isn't one.
AM> \"Defun\" here means a function, or other top level construct
AM> with a brace block."
[...]

Is this going to work with which-func-mode?  Or do they do different
things?

Ted

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy