help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speedbar question


From: Eric Ludlam
Subject: Re: Speedbar question
Date: 24 Mar 2003 09:00:21 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

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 <eludlam@mathworks.com> wrote in message 
>news:<koptolx1xm.fsf@ludlame-mac.dhcp.mathworks.com>...
>> >>> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]