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

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

Re: Modify shell-script-mode for imenu


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

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


reply via email to

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