From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60601 Path: news.gmane.org!not-for-mail From: David Abrahams Newsgroups: gmane.emacs.gnus.general Subject: Re: func-menu Date: Tue, 19 Jul 2005 11:41:14 -0400 Message-ID: References: <83k6lagmx8.fsf@torus.sehlabs.com> <4nvf36x4ey.fsf@lifelogs.com> <4n7jfmu8kb.fsf@lifelogs.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1121787832 27378 80.91.229.2 (19 Jul 2005 15:43:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Jul 2005 15:43:52 +0000 (UTC) Original-X-From: ding-owner+M9129@lists.math.uh.edu Tue Jul 19 17:43:50 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DuuF2-0005Qq-1r for ding-account@gmane.org; Tue, 19 Jul 2005 17:42:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DuuDg-00067x-00; Tue, 19 Jul 2005 10:41:20 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DuuDa-00067s-00 for ding@lists.math.uh.edu; Tue, 19 Jul 2005 10:41:14 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DuuDY-0008JC-VR for ding@lists.math.uh.edu; Tue, 19 Jul 2005 10:41:13 -0500 Original-Received: from smtp04.mrf.mail.rcn.net ([207.172.4.63]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DuuDY-0006mb-00 for ; Tue, 19 Jul 2005 17:41:12 +0200 Original-Received: from 146-115-127-135.c3-0.smr-ubr2.sbo-smr.ma.cable.rcn.com (HELO i9300.boost-consulting.com) ([146.115.127.135]) by smtp04.mrf.mail.rcn.net with ESMTP; 19 Jul 2005 11:41:11 -0400 X-IronPort-AV: i="3.93,300,1115006400"; d="hpp'?scan'208"; a="60395242:sNHT39585736" Original-Received: from dave by i9300.boost-consulting.com with local (Exim 4.50) id IJVSWR-0002I8-4C; Tue, 19 Jul 2005 11:41:15 -0400 Original-To: ding@gnus.org In-Reply-To: <4n7jfmu8kb.fsf@lifelogs.com> (Ted Zlatanov's message of "19 Jul 2005 11:20:04 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (windows-nt) X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60601 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60601 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable "Ted Zlatanov" writes: > On Tue, 19 Jul 2005, dave@boost-consulting.com wrote: > >> "Ted Zlatanov" writes: >>=20 >>> Have you tried which-func-mode in GNU Emacs?=20=20 >>=20 >> What does it do other than try to display the current function name? > > Nothing. I'm sorry for posting before my coffee :) I know and use > imenu, but somehow ended up writing about which-func-mode. I don't know what imenu is either. > You can also look at the speedbar, which is nice (I've used it with > Java). I don't know if the code it uses to recognize functions is > different from imenu. > >> That particular feature is totally broken when it comes to C++. > > Really? Can you submit a bug to the Emacs team, if you have the time? I really don't have time to do that for a thing you just asked me to try and I had no other reason to use. However I'll give you a file that contains one class with inline member functions, where the only thing you ever see in the mode line is the class name. Voil=E0. --=-=-= Content-Type: text/x-c++ Content-Disposition: inline; filename=keyword.hpp // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef KEYWORD_050328_HPP #define KEYWORD_050328_HPP #include #include #include #include namespace boost { namespace parameter { // Instances of unique specializations of keyword<...> serve to // associate arguments with parameter names. For example: // // struct rate_; // parameter names // struct skew_; // namespace // { // keyword rate; // keywords // keyword skew; // } // // ... // // f(rate = 1, skew = 2.4); // template struct keyword : noncopyable { template typename aux::tag::type operator=(T& x) const { typedef typename aux::tag::type result; return result(x); } template aux::default_ operator|(Default& default_) const { return aux::default_(default_); } template aux::lazy_default operator||(Default& default_) const { return aux::lazy_default(default_); } #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1200) // avoid partial ordering bugs template typename aux::tag::type operator=(T const& x) const { typedef typename aux::tag::type result; return result(x); } #endif #if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) // avoid partial ordering bugs template aux::default_ operator|(const Default& default_) const #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) volatile #endif { return aux::default_(default_); } template aux::lazy_default operator||(Default const& default_) const #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) volatile #endif { return aux::lazy_default(default_); } #endif public: // Insurance against ODR violations // People will need to define these keywords in header files. To // prevent ODR violations, it's important that the keyword used in // every instantiation of a function template is the same object. // We provide a reference to a common instance of each keyword // object and prevent construction by users. static keyword& get() { static keyword result; return result; } private: keyword() {} }; // Reduces boilerplate required to declare and initialize keywords // without violating ODR. Declares a keyword tag type with the given // name in namespace tag_namespace, and declares and initializes a // #define BOOST_PARAMETER_KEYWORD(tag_namespace,name) \ namespace tag_namespace { struct name; } \ ::boost::parameter::keyword& name \ = ::boost::parameter::keyword::get(); }} // namespace boost::parameter #endif // KEYWORD_050328_HPP --=-=-= -- Dave Abrahams Boost Consulting www.boost-consulting.com --=-=-=--