emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hydra 112e689f75 28/35: hydra.el (hydra-add-imenu): Add


From: ELPA Syncer
Subject: [elpa] externals/hydra 112e689f75 28/35: hydra.el (hydra-add-imenu): Add
Date: Tue, 25 Oct 2022 22:59:06 -0400 (EDT)

branch: externals/hydra
commit 112e689f75b59398d8eca79ac6562dca12b8a959
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]