From 08f6ecdbeda886afef83cb87ddd3f447a0359927 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 13 Aug 2015 22:40:08 +0200 Subject: Emacs: Remove old imenu-init jump functions --- tag-emacs/emacs.d/init.org | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 4fe6165..cd3ec4d 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1119,36 +1119,6 @@ Option/alt, then Control. ("M-!" . shell-execute))) #+END_SRC -Some stuff for getting around my =init.el=. Now that I’m using -=org-mode=, I’ll probably need to write something else, or fiddle with -org’s navigation commands. - -#+BEGIN_SRC emacs-lisp -(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 '("Packages" "^(req-package\\s-+\\(\\(\\sw\\|\\s_\\)+\\)$" 1) t)) - -(defun init-narrow-to-section () - (interactive) - (save-excursion - (beginning-of-line) - (unless (looking-at "^;;;;") - (re-search-backward "^;;;;" nil t)) - (push-mark) - (forward-line) - (re-search-forward "^;;;;" nil t) - (forward-line -1) - (narrow-to-region (region-beginning) (region-end)))) - -(defun init-imenu (p) - (interactive "P") - (find-file-existing *init-file*) - (widen) - (helm-imenu) - (if p (init-narrow-to-section))) - -(add-hook 'emacs-lisp-mode-hook 'imenu-elisp-sections) #+END_SRC * Minibuffer -- cgit 1.4.1