From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.help Subject: Re: Speedbar question Date: 24 Mar 2003 09:00:21 -0500 Organization: The MathWorks, Inc. Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <7a11102c.0303200857.4ae0466a@posting.google.com> <7a11102c.0303210803.78553848@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048514769 13748 80.91.224.249 (24 Mar 2003 14:06:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Mar 2003 14:06:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 24 15:06:01 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18xSaP-0003Yj-00 for ; Mon, 24 Mar 2003 15:06:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xSa1-00010k-07 for gnu-help-gnu-emacs@m.gmane.org; Mon, 24 Mar 2003 09:05:37 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.mathworks.com!news.mathworks.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: ludlame-mac.dhcp.mathworks.com Original-X-Trace: ginger.mathworks.com 1048514421 26867 144.212.113.235 (24 Mar 2003 14:00:21 GMT) Original-X-Complaints-To: news@mathworks.com Original-NNTP-Posting-Date: Mon, 24 Mar 2003 14:00:21 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:111346 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7848 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7848 You also need to set imenu-generic-expression in test-mode, probably like this: (make-local-variable 'imenu-generic-expression) (setq imenu-generic-expression text-mode-imenu-generic-expression) Eric >>> jwilde@draper.com (John Wilde) seems to think that: >thanks. > >i am trying to add imenu support for the text-mode such that it >accomplishes this, looking at how other modes (eg fortran.el) do >this, i defined the appropriate 'text-mode-imenu-generic-expression' >variable in my text-mode.el file, but the text mode still does not >support imenu. any suggestions on what i'm missing and where i can >look for more help on this? > >thanks, john > > >Eric Ludlam wrote in message news:... >> >>> jwilde@draper.com (John Wilde) seems to think that: >> >I would like to use the speedbar for a custom file type and define a >> >regular expression that determines the line in the file to jump to. i >> >am able to run etags to create the TAGS file that I want, but how do I >> >make this work with speedbar so that it will expand into a list? >> >(Like, for example, the way functions are listed when a .cpp file is >> >opened) >> >> The easiest way to do this is to support imenu. Imenu has it's own >> documentation in Emacs. You can read on how to accomplish this. >> >> Once you have done this, you can add this to your .emacs or imenu >> support file: >> >> (speedbar-add-supported-extension ".foo") >> >> to tell speedbar to try and expand tags in this file. >> >> Good Luck >> Eric -- Eric Ludlam "Photonic Doodler" The MathWorks x 7556 eludlam@mathworks.com (work) http://www.mathworks.com eric@siege-engine.com (home) http://www.siege-engine.com