diff options
| author | Masatake YAMATO | 2012-07-18 09:40:57 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-07-18 09:40:57 -0400 |
| commit | 7f5331cc805b811678d03d7c9be6efe8966ecbfa (patch) | |
| tree | 6b529e3c6996a28b29305cace2a5794aa03e747f /lisp/progmodes | |
| parent | 9aeb25a6b4d684bd79a309326b047ac0ea4afca4 (diff) | |
| download | emacs-7f5331cc805b811678d03d7c9be6efe8966ecbfa.tar.gz emacs-7f5331cc805b811678d03d7c9be6efe8966ecbfa.zip | |
* lisp/progmodes/sh-script.el (sh-imenu-generic-expression):
Capture a function with `function' keyword and without parentheses
like "function FOO".
Fixes: debbugs:11856
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/sh-script.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index be664c6fc6e..a713539cd8e 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -327,8 +327,15 @@ shell it really is." | |||
| 327 | (defcustom sh-imenu-generic-expression | 327 | (defcustom sh-imenu-generic-expression |
| 328 | `((sh | 328 | `((sh |
| 329 | . ((nil | 329 | . ((nil |
| 330 | "^\\s-*\\(function\\s-+\\)?\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()" | 330 | ;; function FOO |
| 331 | 2)))) | 331 | ;; function FOO() |
| 332 | "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*\\(?:()\\)?" | ||
| 333 | 1) | ||
| 334 | ;; FOO() | ||
| 335 | (nil | ||
| 336 | "^\\s-*\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()" | ||
| 337 | 1) | ||
| 338 | ))) | ||
| 332 | "Alist of regular expressions for recognizing shell function definitions. | 339 | "Alist of regular expressions for recognizing shell function definitions. |
| 333 | See `sh-feature' and `imenu-generic-expression'." | 340 | See `sh-feature' and `imenu-generic-expression'." |
| 334 | :type '(alist :key-type (symbol :tag "Shell") | 341 | :type '(alist :key-type (symbol :tag "Shell") |