branch: externals/hydra
commit 112e689f75b59398d8eca79ac6562dca12b8a959
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
hydra.el (hydra-add-imenu): Add
Fixes #380
---
hydra.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hydra.el b/hydra.el
index 5fad230bfa..f13f1451c8 100644
--- a/hydra.el
+++ b/hydra.el
@@ -320,6 +320,15 @@ Exitable only through a blue head.")
(1 font-lock-keyword-face)
(2 font-lock-type-face)))))
+;;* Imenu
+(defun hydra-add-imenu ()
+ "Add this to `emacs-lisp-mode-hook' to have hydras in `imenu'."
+ (add-to-list
+ 'imenu-generic-expression
+ '("Hydras"
+ "^.*(\\(defhydra\\) \\([a-zA-Z-]+\\)"
+ 2)))
+
;;* Find Function
(eval-after-load 'find-func
'(defadvice find-function-search-for-symbol