about summary refs log tree commit diff stats
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2024-10-07 12:09:19 +0100
committerDavid Morgan <djm_uk@protonmail.com>2024-10-07 12:09:19 +0100
commitf308fc30af35b11bf87f4ebd8a026d8b6f3cd046 (patch)
treea80d7a99975cf807d2d966f814cea8c2c80d09ce /.emacs.d/lisp
parent86b94843735c9b4082ab84b08f36893505a4dd1f (diff)
downloaddotfiles-f308fc30af35b11bf87f4ebd8a026d8b6f3cd046.tar.gz
Correctly use a new dabbrev
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-completion.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-completion.el b/.emacs.d/lisp/init-completion.el
index e0efdb3..c133e91 100644
--- a/.emacs.d/lisp/init-completion.el
+++ b/.emacs.d/lisp/init-completion.el
@@ -4,10 +4,20 @@
 ;; Most of it is taken from the READMEs and wikis of those packages
 ;;; Code:
 
+(defun +elpaca-unload-dabbrev (e)
+  (and (featurep 'dabbrev) (unload-feature 'dabbrev t))
+  (elpaca--continue-build e))
+
+(defun +elpaca-dabbrev-build-steps ()
+  (append (butlast (if (file-exists-p (expand-file-name "dabbrev" elpaca-builds-directory))
+                       elpaca--pre-built-steps elpaca-build-steps))
+          (list '+elpaca-unload-dabbrev 'elpaca--activate-package)))
+
 (use-feature dabbrev
   ;; Load newer version until 30.1 is released
   ;; https://mail.gnu.org/archive/html/bug-gnu-emacs/2024-05/msg00422.html
-  :load-path "elpaca/repos/project/lisp/dabbrev.el"
+  ;; Relies on the fact that the emacs repo is checked out to elpaca/repos/project
+  :ensure `(dabbrev :build ,(+elpaca-dabbrev-build-steps) :repo "~/.emacs.d/elpaca/repos/project/" :files ("lisp/dabbrev.el"))
   :custom
   (dabbrev-case-distinction nil)
   (dabbrev-case-fold-search t)