X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/4dc7c8d5795458e89d19b59f64760e155c2cd70b..7f5331cc805b811678d03d7c9be6efe8966ecbfa:/lisp/progmodes/sh-script.el diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index be664c6fc6..a713539cd8 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -327,8 +327,15 @@ shell it really is." (defcustom sh-imenu-generic-expression `((sh . ((nil - "^\\s-*\\(function\\s-+\\)?\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()" - 2)))) + ;; function FOO + ;; function FOO() + "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*\\(?:()\\)?" + 1) + ;; FOO() + (nil + "^\\s-*\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()" + 1) + ))) "Alist of regular expressions for recognizing shell function definitions. See `sh-feature' and `imenu-generic-expression'." :type '(alist :key-type (symbol :tag "Shell")