unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Matching bash functions
@ 2024-07-31 23:54 Heime
  0 siblings, 0 replies; only message in thread
From: Heime @ 2024-07-31 23:54 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I have the following regexp for matching bash functions with imenu.

("Functions"
   ,(concat "^\\s-*"
            "\\(?:function\\s-+\\)?"
            "\\([[:word:]_-][[:word:]_[:digit:]]*\\)"
            "\\s-*\\(()\\)?") 1))

But I cannot match 

function function_name {
    # function body
}

although I can match this

function_name () {
    # function body
}




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-31 23:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 23:54 Matching bash functions Heime

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).