From d48e13dd41d9793478ff10ca136a8f6908ef1dd3 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Sat, 13 Jan 2024 01:07:16 -0500 Subject: [PATCH] Unload seq before elpaca build, redefine zig-compile --- dot_config/emacs/init.el | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/dot_config/emacs/init.el b/dot_config/emacs/init.el index f9a9848..ee3772d 100644 --- a/dot_config/emacs/init.el +++ b/dot_config/emacs/init.el @@ -78,6 +78,17 @@ (add-hook 'after-init-hook #'elpaca-process-queues) (elpaca `(,@elpaca-order)) +;; Unload seq before elpaca build - also see `use-package' declaration for seq below +;; https://github.com/progfolio/elpaca/issues/216#issuecomment-1868444883 +(defun +elpaca-unload-seq (e) + (and (featurep 'seq) (unload-feature 'seq t)) + (elpaca--continue-build e)) + +(defun +elpaca-seq-build-steps () + (append (butlast (if (file-exists-p (expand-file-name "seq" elpaca-builds-directory)) + elpaca--pre-built-steps elpaca-build-steps)) + (list '+elpaca-unload-seq 'elpaca--activate-package))) + ;; use-package (elpaca elpaca-use-package (elpaca-use-package-mode) @@ -231,6 +242,10 @@ (setq save-place-file (concat xdg_cache_home "places")) (save-place-mode)) +(use-package seq + ; Unload seq before elpaca build + :elpaca `(seq :build ,(+elpaca-seq-build-steps))) + (use-package simple :elpaca nil :config @@ -708,7 +723,12 @@ ;; Zig (use-package zig-mode :commands (zig-mode) - :config (setq-local fill-column 100)) + :config + (defun zig-compile () + (interactive) + (save-buffer) + (zig--run-cmd "build")) + (setq-local fill-column 100)) ;;; File format/markup support (use-package markdown-mode