summaryrefslogtreecommitdiff
path: root/jakob.org
diff options
context:
space:
mode:
Diffstat (limited to 'jakob.org')
-rw-r--r--jakob.org40
1 files changed, 8 insertions, 32 deletions
diff --git a/jakob.org b/jakob.org
index fee1864..5f7e80d 100644
--- a/jakob.org
+++ b/jakob.org
@@ -88,31 +88,6 @@ without reqiring an explicit =:straight t=.
:diminish visual-line-mode)
#+END_SRC
-** Dependency Management
-
-=use-package= provies a number of features such as =:after= to defer the loading of
-packages and their configurations until some other package has been loaded, but
-I've wrestled witth this functionality for weeks now and realized that it's not
-well-suited for configuring packages in a way that depends on symbols from
-another package. As an alternative, I've chosen to use the =with-eval-after-load=
-machinery provided by Vanilla Emacs, albeit wrapped in a slightly more ergnomic
-macro that allows for dependence on multiple packages rather than just one.
-
-#+BEGIN_SRC elisp
-(defmacro when-all-loaded (files &rest form)
- "Nests FORM in several `with-eval-after-load' for each of FILES.
-FILES can be either a symbol, representing dependence on a single
-package, or a list of symbols, representing dependence on more
-than one package."
- (let ((form `(progn ,@form))
- (files (if (symbolp files) (list files) files)))
- (dolist (file files)
- (setq form `(with-eval-after-load (quote ,file) ,form)))
- form))
-
-(put 'when-all-loaded 'lisp-indent-function 1)
-#+END_SRC
-
** Libraries
A handful of the Elisp snippets in this file depend on third-party libraries
@@ -1727,9 +1702,9 @@ private message.
#+BEGIN_SRC elisp
(use-package ercn
- :init
- (when-all-loaded erc
- (add-hook 'ercn-notify 'dunst-alert)))
+ :after erc
+ :config
+ (add-hook 'ercn-notify 'dunst-alert))
#+END_SRC
Configure =erc-hl-nicks= to show names using pretty colors.
@@ -1812,7 +1787,7 @@ change."
(current-buffer)))))
(delete-overlay erc-bar-overlay))))
-(when-all-loaded erc
+(with-eval-after-load 'erc
;; Run the hook before 'erc-modified-channels-update
(defadvice erc-track-mode (after erc-bar-setup-hook
(&rest args) activate)
@@ -2285,6 +2260,8 @@ Set up [[company]].
#+BEGIN_SRC elisp
(use-package company-jedi
+ :after company
+
:hook
(python-mode . company-mode)
(python-mode . jedi:setup)
@@ -2293,9 +2270,8 @@ Set up [[company]].
(setq jedi:complete-on-dot t)
(setq jedi:tooltip-method nil)
- :init
- (when-all-loaded company
- (add-to-list 'company-backends 'company-jedi)))
+ :config
+ (add-to-list 'company-backends 'company-jedi))
#+END_SRC
** Hy

© 2015 - 2026 Jakob L. Kreuze