From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14378 invoked by alias); 26 Mar 2014 20:43:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14368 invoked by uid 89); 26 Mar 2014 20:43:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Mar 2014 20:43:23 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2QKhLRK022716 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Mar 2014 16:43:21 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2QKhJVT024856; Wed, 26 Mar 2014 16:43:20 -0400 Message-ID: <53333BE7.8070301@redhat.com> Date: Wed, 26 Mar 2014 20:43:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Doug Evans CC: gdb-patches Subject: Re: [RFC] Stop putting function comments in foo.h References: <53271DC0.3050405@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-03/txt/msg00623.txt.bz2 On 03/26/2014 04:45 PM, Doug Evans wrote: > On Tue, Mar 18, 2014 at 8:59 AM, Doug Evans wrote: >> On Mon, Mar 17, 2014 at 9:07 AM, Pedro Alves 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