unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "gamename" <namesagame-usenet@yahoo.com>
Subject: Re: More imenu questions
Date: 10 Nov 2005 17:57:15 -0800	[thread overview]
Message-ID: <1131674235.003097.278410@o13g2000cwo.googlegroups.com> (raw)
In-Reply-To: mailman.14778.1131657088.20277.help-gnu-emacs@gnu.org

Hi Peter,

Thanks for the regex pointers. That helps.  I'll have to give you a
little background to explain what I'm trying.

I have an in-house developed tcl package with code blocks in the
following format:

aetest::testcase -tc_id rekey {
    aetest::subtest -subtc_id test1 {
        aetest::section setup {        }
        aetest::section test {        }
        aetest::section cleanup {        }
    }
    aetest::subtest -subtc_id test2 {
        aetest::section setup {        }
        aetest::section test {        }
        aetest::section cleanup {        }
    }
    etc ...
}

So, I'm trying to create an imenu menu hierarchy which will allow me to
put them in some kind of logical order.  Here is what I have:

(setq tcl-imenu-generic-expression
 '(("Testcase"  "aetest::testcase +-tc_id +\\([-_A-Za-z0-9+]+\\) +{" 1)
 ("SubTest"  "aetest::subtest +-subtc_id +\\([-_A-Za-z0-9+]+\\) +{" 2)
 ("Section"  "aetest::section +\\([-_A-Za-z0-9+]+\\) +{" 3)))

(add-hook 'tcl-mode-hook
   (function (lambda ()
         (setq imenu-generic-expression
tcl-imenu-generic-expression))))

I hope this clarifies what I'm trying to do.  Is this the correct way
to approach it?  

TIA,

  parent reply	other threads:[~2005-11-11  1:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-10 19:23 More imenu questions gamename
2005-11-10 21:11 ` Peter Dyballa
2005-11-10 22:00 ` Kevin Rodgers
2005-11-10 23:55 ` rgb
     [not found] ` <mailman.14783.1131660316.20277.help-gnu-emacs@gnu.org>
2005-11-11  0:15   ` rgb
     [not found] ` <mailman.14778.1131657088.20277.help-gnu-emacs@gnu.org>
2005-11-11  1:57   ` gamename [this message]
2005-11-11 16:43     ` rgb
2005-11-11 17:04       ` Drew Adams
2005-11-11 23:58       ` Donal K. Fellows
2005-11-14 22:24         ` Bruce Stephens
2005-11-12 17:20       ` gamename

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1131674235.003097.278410@o13g2000cwo.googlegroups.com \
    --to=namesagame-usenet@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).