unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11856: 24.0.97; Improve imenu expression of sh-script mode to handle "function FOO"
@ 2012-07-04 17:47 Masatake YAMATO
  2012-07-08 23:24 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Masatake YAMATO @ 2012-07-04 17:47 UTC (permalink / raw)
  To: 11856

This is not a bug report. This is a request for reviwing and merging a
patch.

With this patch foo in following shell script can be captured
as an imenu entry.

    function foo
    {
      ...

(Even witohut this patch

     function foo()
     {
       ...

and

     foo()
     {
      ...

can be captured.)


2012-07-04  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".

=== modified file 'lisp/progmodes/sh-script.el'
--- lisp/progmodes/sh-script.el	2012-05-11 14:24:50 +0000
+++ lisp/progmodes/sh-script.el	2012-07-04 03:57:10 +0000
@@ -327,8 +327,15 @@
 (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")






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#11856: 24.0.97; Improve imenu expression of sh-script mode to handle "function FOO"
  2012-07-04 17:47 bug#11856: 24.0.97; Improve imenu expression of sh-script mode to handle "function FOO" Masatake YAMATO
@ 2012-07-08 23:24 ` Stefan Monnier
  2012-07-11  5:45   ` Masatake YAMATO
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2012-07-08 23:24 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: 11856

> This is not a bug report. This is a request for reviwing and merging a
> patch.

Looks good, please install,


        Stefan





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#11856: 24.0.97; Improve imenu expression of sh-script mode to handle "function FOO"
  2012-07-08 23:24 ` Stefan Monnier
@ 2012-07-11  5:45   ` Masatake YAMATO
  2012-07-18 13:42     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Masatake YAMATO @ 2012-07-11  5:45 UTC (permalink / raw)
  To: monnier; +Cc: 11856

>> This is not a bug report. This is a request for reviwing and merging a
>> patch.
> 
> Looks good, please install,
> 
> 
>         Stefan

I'm sorry but could you install the patch?

I deleted my self from 'emacs commiters' when my hard disk was
broken and my domain (gyve.org) was lost simultaneously.

Masatake YAMATO





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#11856: 24.0.97; Improve imenu expression of sh-script mode to handle "function FOO"
  2012-07-11  5:45   ` Masatake YAMATO
@ 2012-07-18 13:42     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2012-07-18 13:42 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: 11856

>>> This is not a bug report. This is a request for reviwing and merging a
>>> patch.
>> Looks good, please install,
> I'm sorry but could you install the patch?

Of course, done.

> I deleted my self from 'emacs commiters' when my hard disk was
> broken and my domain (gyve.org) was lost simultaneously.

Feel free to re-request memership from your savannah account, so I can
re-add you there.


        Stefan





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-18 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-04 17:47 bug#11856: 24.0.97; Improve imenu expression of sh-script mode to handle "function FOO" Masatake YAMATO
2012-07-08 23:24 ` Stefan Monnier
2012-07-11  5:45   ` Masatake YAMATO
2012-07-18 13:42     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).