Closed snowman closed 2 years ago
I would suggest using :custom
. Typing M-x pp-macroexpand-last-sexp RET
tells me that your first form expands to this, which seems to be what you want:
(progn
(let
((custom--inhibit-theme-enable nil))
(unless
(memq 'use-package custom-known-themes)
(deftheme use-package)
(enable-theme 'use-package)
(setq custom-enabled-themes
(remq 'use-package custom-enabled-themes)))
(custom-theme-set-variables 'use-package
'(recentf-auto-cleanup 'never nil nil "Customized with use-package recentf")))
(unless
(fboundp 'recentf-mode)
(autoload #'recentf-mode "recentf" nil t))
(add-hook 'after-init-hook #'recentf-mode))
I use package
recentf
, which has customize variablerecentf-auto-cleanup
with default value ofmode
, which means it'll cleanup some missing file path after turning therecentf-mode
on.Here is the customization of
recentf
:so when loading the package, with
:custom
keyword defined, what's the value of the variable (mode
ornever
)? and which one should I use,:init
or:custom
? Thanks