From 112e689f75b59398d8eca79ac6562dca12b8a959 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Sat, 11 Jul 2020 14:10:04 +0200 Subject: [PATCH] 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 5fad230..f13f145 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