From 298e9d8b43006588d3a4f1ecbcfaf48d9df42af0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 27 May 2013 14:32:08 +0100 Subject: Emacs: add use-package declarations to Imenu when in elisp --- emacs/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit 1.4.1