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

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

Modify shell-script-mode for imenu


From: Matthew Persico
Subject: Modify shell-script-mode for imenu
Date: Wed, 17 Feb 2016 15:25:52 -0500

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


reply via email to

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