From 4d3268ba39ffbc885b0238bacdbe61bdf29f526f Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Sat, 20 Apr 2013 03:50:28 +0900 Subject: [PATCH] * lisp/progmodes/sh-script.el (sh-imenu-generic-expression): Handle function names with a single character. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/sh-script.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c46b9a5ceab..4897aa0f30c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-04-19 Masatake YAMATO + + * progmodes/sh-script.el (sh-imenu-generic-expression): Handle + function names with a single character. + 2013-04-19 Dima Kogan (tiny change) * progmodes/gud.el (gud-perldb-marker-filter): Understand position info diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index e197f9cfabe..07e9bb85c4e 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -335,11 +335,11 @@ shell it really is." . ((nil ;; function FOO ;; function FOO() - "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*\\(?:()\\)?" + "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" 1) ;; FOO() (nil - "^\\s-*\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()" + "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" 1) ))) "Alist of regular expressions for recognizing shell function definitions. -- 2.39.2