lang/sh: recognize functions w/ dashes in imenu
This commit is contained in:
parent
d0484c2ae7
commit
2b13451ea8
1 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,11 @@
|
||||||
|
|
||||||
(setq sh-indent-after-continuation 'always)
|
(setq sh-indent-after-continuation 'always)
|
||||||
|
|
||||||
|
;; recognize function names with dashes in them
|
||||||
|
(push '((sh . ((nil "^\\s-*function\\s-+\\([[:alpha:]_-][[:alnum:]_-]*\\)\\s-*\\(?:()\\)?" 1)
|
||||||
|
(nil "^\\s-*\\([[:alpha:]_-][[:alnum:]_-]*\\)\\s-*()" 1))))
|
||||||
|
sh-imenu-generic-expression)
|
||||||
|
|
||||||
;; 1. Fontifies variables in double quotes
|
;; 1. Fontifies variables in double quotes
|
||||||
;; 2. Fontify command substitution in double quotes
|
;; 2. Fontify command substitution in double quotes
|
||||||
;; 3. Fontify built-in/common commands (see `+sh-builtin-keywords')
|
;; 3. Fontify built-in/common commands (see `+sh-builtin-keywords')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue