[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build-completion using imenu search hits
From: |
hugo |
Subject: |
Re: Build-completion using imenu search hits |
Date: |
Mon, 25 May 2009 09:14:25 -0700 (PDT) |
User-agent: |
G2/1.0 |
On 25 maio, 11:44, Nordlöw <per.nord...@gmail.com> wrote:
> How can I programmatically access the hits from the search done by
> imenu using for example
>
> (defconst bjam-imenu-generic-expression
> `(
> ("Executables" ,(concat "^\\(exe\\)" "[[:space:]\n]+" "\\([A-Za-
> z0-9_/.]+\\)" "[[:space:]\n]+" ":") 2)
> ("Libraries" ,(concat "^\\(lib\\)" "[[:space:]\n]+" "\\([A-Za-
> z0-9_/.]+\\)" "[[:space:]\n]+" ":") 2)
> ("Projects" ,(concat "^\\(project\\)" "[[:space:]\n]+" "\\([A-Za-
> z0-9_/.]+\\)" "[[:space:]\n]+" ":") 2)
>
> ;;http://www.boost.org/doc/libs/1_38_0/doc/html/bbv2/tasks.html#bbv2.re...
> ("Precompiled C Headers" "^c-pch[[:space:]\n]+\\([A-Za-z0-9_/.]+\\)
> [[:space:]\n]+:" 1)
> ("Precompiled C++ Headers" "^cpp-pch[[:space:]\n]+\\([A-Za-z0-9_/.]
> +\\)[[:space:]\n]+:" 1)
>
> ("Rules" "^rule[[:space:]\n]+\\([A-Za-z0-9_]+\\)" 1)
> ("Actions" "^actions[[:space:]\n]+\\([A-Za-z0-9_]+\\)" 1)
> )
> "Imenu generic expression for BJam mode. See `imenu-generic-
> expression'.")
> ;; Use: (nth 1 (assoc "Executables" bjam-imenu-generic-expression))
>
> in bjam-mode.el. I wan't to use this to provide build/clean target
> completion from the menu.
>
> Thanks in advance,
> Per Nordlöw
Search for imeny on this Anything config:
http://www.emacswiki.org/emacs/anything-config.el
Cheers
Hugo