Closed leira closed 1 year ago
I dig a bit into it.
(enable-theme 'use-package)
is part of https://github.com/jwiegley/use-package/blob/master/use-package-core.el
enable-theme
function has this code, that's where enable-theme(user)
in the stack is from:
(unless (eq theme 'user)
(setq custom-enabled-themes
(cons theme (remq theme custom-enabled-themes)))
;; Give the `user' theme the highest priority.
(enable-theme 'user))
And the code before in enable-theme
is like:
(let ((settings (get theme 'theme-settings)) ; '(prop symbol theme value)
;; We are enabling the theme, so don't inhibit enabling it. (Bug#34027)
(custom--inhibit-theme-enable nil))
;; Loop through theme settings, recalculating vars/faces.
(dolist (s settings)
(let* ((prop (car s))
(symbol (cadr s))
(spec-list (get symbol prop))
(sv (get symbol 'standard-value))
(val (and (boundp symbol) (symbol-value symbol))))
...
(cond
((eq prop 'theme-face)
(custom-theme-recalc-face symbol))
((eq prop 'theme-value)
;; Ignore `custom-enabled-themes' and `custom-safe-themes'.
(unless (memq symbol '(custom-enabled-themes custom-safe-themes))
(custom-theme-recalc-variable symbol)))))))
I tried (get 'user 'theme-settings)
, I got
((theme-value package-archive-priorities user ('(("gnu" . 99) ("nongnu" . 80) ("stable" . 70) ("melpa" . 0)))) (theme-value scroll-conservatively user (101)) (theme-value switch-to-buffer-in-dedicated-window user ('pop)) (theme-value completions-detailed user (t)) (theme-value kill-do-not-save-duplicates user (t)) (theme-value completion-category-overrides user ('(...))) (theme-value tab-always-indent user ('complete)) (theme-value switch-to-buffer-obey-display-actions user (t)) (theme-value mouse-wheel-progressive-speed user (nil)) (theme-value ibuffer-movement-cycle user (nil)) (theme-value load-prefer-newer user (t)) (theme-value scroll-margin user (0)) ...)
This is how package-archive-priorities
get into the picture. But I'm don't know what it means.
(get 'user 'theme-settings)
in emacs -Q
returns nil.
hmm, restart emacs seems working. It seems just evaling (use-package meow)
directly in emacs caused the problem...
It works with restart Emacs, so close it.
Hi, I'm trying to use the crafted-emacs'
craftedv2alpha
branch. I simply used the early-init-example.el and init-example.el in my emacs.d. Emacs started well. I want to add some of my own modules using use-package, as use-package is already part of emacs 29. Butuse-package
macro failed to eval. Here are the code and backtrace:Actually,
c-h f use-package
also gives error(invalid-function '(("gnu" . 99) ("nongnu" . 80) ("stable" . 70) ("melpa" . 0)))
. The same code works fine withemacs -Q
.It seems have something to do with the code in
crafted-early-init-config.el
, but I'm not familiar with elisp enough to figure out how: