From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.help Subject: Re: Can I get semantic summary manually? Date: Tue, 03 Jan 2006 09:30:57 -0500 Organization: The MathWorks, Inc., Natick, MA 01760 Message-ID: References: <1135355303.910320.246010@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136303818 19463 80.91.229.2 (3 Jan 2006 15:56:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Jan 2006 15:56:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 03 16:56:53 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EtoWf-0005nX-Rw for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jan 2006 16:56:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EtoYH-0001V2-TW for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jan 2006 10:58:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed-00.mathworks.com!news.mathworks.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: ludlamelinux.dhcp.mathworks.com Original-X-Trace: fred.mathworks.com 1136298657 2890 144.212.109.174 (3 Jan 2006 14:30:57 GMT) Original-X-Complaints-To: news@mathworks.com Original-NNTP-Posting-Date: Tue, 3 Jan 2006 14:30:57 +0000 (UTC) User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:ND/UY7xr4n+5QSynIvmzsIV9AUg= Original-Xref: shelby.stanford.edu gnu.emacs.help:136759 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32378 Archived-At: >>> "c.c" seems to think that: >Hi, > >The semantic package provides the 'semantic-idle-summary-mode' to show >the summary info in imenu at idle time. Can I get these summaries >showed whenever i want? > >thanks. > The command `semantic-analyze-current-context' when run interactively will display a bunch of info. Here is an example on writing such a fcn I'll add into CVS sometime later. This does something similar to the idle summary, though it is not the same. Eric ---------- (defun semantic-ia-show-summary (point) "Display a summary for the symbol under POINT." (interactive "P") (let* ((ctxt (semantic-analyze-current-context point)) (pf (reverse (oref ctxt prefix))) (sum nil) ) (while (and pf (not sum)) (if (semantic-tag-p (car pf)) (setq sum (semantic-format-tag-summarize (car pf) nil t))) (setq pf (cdr pf))) (message "%s" sum) )) -- Eric Ludlam The MathWorks x 7556 eludlam@mathworks.com http://www.siege-engine.com http://www.mathworks.com