[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More imenu questions
From: |
gamename |
Subject: |
Re: More imenu questions |
Date: |
10 Nov 2005 17:57:15 -0800 |
User-agent: |
G2/0.2 |
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,