all repos — nixfiles @ 298e9d8b43006588d3a4f1ecbcfaf48d9df42af0

System and user configuration, managed by nix and home-manager

Emacs: add use-package declarations to Imenu when in elisp
Alan Pearce alan@alanpearce.co.uk
Mon, 27 May 2013 14:32:08 +0100
commit

298e9d8b43006588d3a4f1ecbcfaf48d9df42af0

parent

b19e6b7177b67fdd15fd306a47754a313068a6df

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M emacs/init.elemacs/init.el
@@ -880,7 +880,8 @@ (slime-setup))) 
 (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)