Replace custom imenu support use-package with builtin one

Reference: https://protesilaos.com/dotemacs/#h:cfa129a4-3394-4911-9097-4544df4e6ed9
master
Daniel Borchmann 2 years ago
parent 3d2332ac4e
commit 5961491f77
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
  1. 7
      init.el
  2. 7
      site-lisp/db-utils.el

@ -40,6 +40,8 @@
(package-initialize))
(eval-when-compile
(setq use-package-enable-imenu-support t)
(dolist (package '(bind-key use-package))
(unless (package-installed-p package)
(package-install package))
@ -595,7 +597,6 @@
turn-on-lispy-when-available
db/sort-nsm-permanent-settings
endless/colorize-compilation
db/add-use-package-to-imenu
db/turn-off-local-electric-pair-mode
db/add-symbols-to-TeX-input-method
db/two-monitors-xrandr
@ -2321,9 +2322,7 @@ With given ARG, display files in `db/important-document-path’."
(use-package elisp-mode
:defer t
:config (progn
(add-hook 'emacs-lisp-mode-hook 'turn-on-lispy-when-available)
(add-hook 'emacs-lisp-mode-hook 'db/add-use-package-to-imenu)))
:config (add-hook 'emacs-lisp-mode-hook 'turn-on-lispy-when-available))
(use-package geiser
:commands (geiser-mode))

@ -270,13 +270,6 @@ Will print a warning in case of failure."
(let ((inhibit-read-only t))
(ansi-color-apply-on-region compilation-filter-start (point))))
(defun db/add-use-package-to-imenu ()
"Add `use-package’ statements to `imenu-generic-expression."
(add-to-list 'imenu-generic-expression
'("Used Packages"
"\\(^\\s-*(use-package +\\)\\(\\_<.+\\_>\\)"
2)))
(defun db/turn-off-local-electric-pair-mode ()
"Locally turn off electric pair mode."
(interactive)

Loading…
Cancel
Save