aboutsummaryrefslogtreecommitdiffstats
path: root/oni-core.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2023-05-25 15:29:42 -0700
committerGravatar Tom Willemse2023-05-25 15:29:42 -0700
commit09615b953aa9f5eb88d27f7bf646247ee9de7527 (patch)
tree472f63d0d3894b2eb9dba755debfcd52c88bd3dc /oni-core.el
parent23ee5ed080bd249564e17e4fadd80223a37ed9fd (diff)
downloademacs-config-09615b953aa9f5eb88d27f7bf646247ee9de7527.tar.gz
emacs-config-09615b953aa9f5eb88d27f7bf646247ee9de7527.zip
[oni-core] Require ‘consult’ when byte-compiling ‘oni-core’
When everything is interpreted it all works fine because ‘consult’ is loaded before the ‘with-eval-after-load’ part is run, but when byte compiling the byte compiler doesn't know that ‘consult-customize’ is a macro unless ‘consult’ is loaded, which it isn't when Guix compiles it. When it's byte-compiled as if it's a function ‘consult-buffer’ is assumed to be a variable that's passed in, so I'm guessing it's trying to dereference it first before passing it on to a non-existent function? But of course ‘consult-buffer’ is only a function (Emacs Lisp is a Lisp-2 after all), so it fails, but only when byte compiled (and even only when byte-compiled in a clean environment where there are no packages loaded that aren't explicity said to be). Hopefully this fixes my issue with being unable to switch buffers until I explicitly load ‘consult’.
Diffstat (limited to 'oni-core.el')
-rw-r--r--oni-core.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/oni-core.el b/oni-core.el
index ca9b403..4d16a11 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2023.0524.235720
+;; Version: 2023.0525.151855
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame)
;; This program is free software; you can redistribute it and/or modify
@@ -450,14 +450,14 @@ _s_: String list"
:enabled buffer-file-name
:action find-file))
-(defun oni-core-remove-consult-buffer-preview ()
- (consult-customize consult-buffer :preview-key nil))
+(eval-when-compile
+ (require 'consult))
(with-eval-after-load 'consult
(with-eval-after-load 'related-files
(add-to-list 'consult-buffer-sources 'oni-core-related-places-source))
- (oni-core-remove-consult-buffer-preview))
+ (consult-customize consult-buffer :preview-key nil))
;;; Embark