]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/sh-script.el (sh-imenu-generic-expression):
authorMasatake YAMATO <yamato@redhat.com>
Wed, 18 Jul 2012 13:40:57 +0000 (09:40 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 18 Jul 2012 13:40:57 +0000 (09:40 -0400)
Capture a function with `function' keyword and without parentheses
like "function FOO".

Fixes: debbugs:11856
lisp/ChangeLog
lisp/progmodes/sh-script.el

index fcb0d9859bef15a510aea4116e303641025933f1..103f6dcfd5ba7bf747a38f2006b46cb44241ba21 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-18  Masatake YAMATO  <yamato@redhat.com>
+
+       * progmodes/sh-script.el (sh-imenu-generic-expression):
+       Capture a function with `function' keyword and without parentheses
+       like "function FOO" (bug#11856).
+
 2012-07-18  Tassilo Horn  <tassilo@member.fsf.org>
 
        * window.el (split-window-sensibly): Make WINDOW argument
        * descr-text.el (describe-char): Fix format args.  (Bug#10129)
 
 2012-07-17  Fabián Ezequiel Gallina  <fgallina@cuca>
+
        Final renames and doc fixes for movement commands (bug#11899).
-       * progmodes/python.el (python-nav-beginning-of-statement): Rename
-       from python-nav-statement-start.
+       * progmodes/python.el (python-nav-beginning-of-statement):
+       Rename from python-nav-statement-start.
        (python-nav-end-of-statement): Rename from
        python-nav-statement-end.
        (python-nav-beginning-of-block): Rename from
@@ -62,8 +69,8 @@
 
 2012-07-17  Fabián Ezequiel Gallina  <fgallina@cuca>
 
-       * progmodes/python.el (python-shell-send-string-no-output): Allow
-       accept-process-output to quit, keeping shell process ready for
+       * progmodes/python.el (python-shell-send-string-no-output):
+       Allow accept-process-output to quit, keeping shell process ready for
        future interactions (Bug#11868).
 
 2012-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
index be664c6fc6e4b94b93c18a63183ebae2653b2204..a713539cd8eb77a9eea1dfd7963e5e402a89f109 100644 (file)
@@ -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")