summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2013-05-27 14:32:08 +0100
committerAlan Pearce2013-05-27 14:32:08 +0100
commit298e9d8b43006588d3a4f1ecbcfaf48d9df42af0 (patch)
treeb65fb7decb28eed81866bd80aab8debbe02fe83b
parentb19e6b7177b67fdd15fd306a47754a313068a6df (diff)
downloadnixfiles-298e9d8b43006588d3a4f1ecbcfaf48d9df42af0.tar.lz
nixfiles-298e9d8b43006588d3a4f1ecbcfaf48d9df42af0.tar.zst
nixfiles-298e9d8b43006588d3a4f1ecbcfaf48d9df42af0.zip
Emacs: add use-package declarations to Imenu when in elisp
-rw-r--r--emacs/init.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el
index b6e20b31..7dc6e42f 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -880,7 +880,8 @@ Also returns nil if pid is nil."
 
 (defun imenu-elisp-sections ()
   (setq imenu-prev-index-position-function nil)
-  (add-to-list 'imenu-generic-expression '("Sections" "^;;;; \\(.+\\)$" 1) t))
+  (add-to-list 'imenu-generic-expression '("Sections" "^;;;; \\(.+\\)$" 1) t)
+  (add-to-list 'imenu-generic-expression '("Packages" "^(use-package\\s-+\\(\\(\\sw\\|\\s_\\)+\\)$" 1) t))
 
 (defun init-narrow-to-section ()
   (interactive)