This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Stop putting function comments in foo.h


On 03/26/2014 04:45 PM, Doug Evans wrote:
> On Tue, Mar 18, 2014 at 8:59 AM, Doug Evans <dje@google.com> wrote:
>> On Mon, Mar 17, 2014 at 9:07 AM, Pedro Alves <palves@redhat.com> wrote:
>>> IMO, a module's API documentation should be in its header file, as
>>> that's where the module's "public" contract is defined.
>>> Needing to peek at the module's implementation feels wrong to me.
>>> If the function's documentation isn't clear without looking
>>> at the function's body, something is already wrong with
>>> the comment.
>>
>> It use to be that M-. took me to the function definition and its documentation.
>>
>> I'm curious what other emacs+etags users do now.
> 
> fwiw, I'd REALLY like an answer to this.
> 
> M-. worked great before people started moving function comments to headers.
> I can be looking at any function in the source, put the cursor over
> its name, M-. RET, and voila!  I'm reading the function's comment or I
> I can begin hacking/reading its implementation.

I've never actually got used to use M-. myself (always tend to end
up grepping), but I've recently started using cedet (from bzr).

Alex Ott has a good writing on it:

 http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html

E.g., semantic-analyze-proto-impl-toggle toggles between declaration
and implementation.  Or semantic-ia-fast-jump takes you to a variable/function's
declaration.

He has a git tree with handy bits to crib from:
 https://github.com/alexott/emacs-configs/blob/master/rc/emacs-rc-cedet.el

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]