* Modify shell-script-mode for imenu
@ 2016-02-17 20:25 Matthew Persico
2016-02-17 20:56 ` Matthew Persico
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Persico @ 2016-02-17 20:25 UTC (permalink / raw)
To: help-gnu-emacs
Greetings.
imenu does not recognize bash functions of the form
foo-bar()
{
...
}
i.e, functions with dashes in them. shell-script-mode does recognize them,
as they are properly highlighted.
Both modes recognise
foo_bar()
{
...
}
i.e, functions with underbars.
I've been trying to use defadvice to wrap sh-current-defun-name and
sh-imenu-generic-expression to get imenu to be happy. But it isn't working
and, given that shell-script-mode DOES recognize the forms, I'm wondering
if it's not something in imenu that has to be adjusted.
Does anyone have any ideas as to how I should proceed?
--
Matthew O. Persico
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Modify shell-script-mode for imenu
2016-02-17 20:25 Modify shell-script-mode for imenu Matthew Persico
@ 2016-02-17 20:56 ` Matthew Persico
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Persico @ 2016-02-17 20:56 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, Feb 17, 2016 at 3:25 PM, Matthew Persico <matthew.persico@gmail.com>
wrote:
> Greetings.
>
> imenu does not recognize bash functions of the form
>
> foo-bar()
> {
> ...
> }
>
> i.e, functions with dashes in them. shell-script-mode does recognize them,
> as they are properly highlighted.
>
> Both modes recognise
>
> foo_bar()
> {
> ...
> }
>
> i.e, functions with underbars.
>
> I've been trying to use defadvice to wrap sh-current-defun-name and
> sh-imenu-generic-expression to get imenu to be happy. But it isn't working
> and, given that shell-script-mode DOES recognize the forms, I'm wondering
> if it's not something in imenu that has to be adjusted.
>
> Does anyone have any ideas as to how I should proceed?
>
> --
> Matthew O. Persico
>
Turns out cannot defadvise a defcustom variable such
as sh-imenu-generic-expression. Duh!
If anyone is interested in what I eventually did:
http://hastebin.com/oxalibopar.lisp
--
Matthew O. Persico
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-17 20:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 20:25 Modify shell-script-mode for imenu Matthew Persico
2016-02-17 20:56 ` Matthew Persico
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).