Variable: use-package-defaults
use-package-defaults is a customizable variable defined in
use-package-core.el.gz.
Value
((:config '(t) t) (:init nil t)
(:catch t (lambda (name args) (not use-package-expand-minimally)))
(:defer use-package-always-defer
(lambda (name args)
(and use-package-always-defer
(not (plist-member args :defer))
(not (plist-member args :demand)))))
(:demand use-package-always-demand
(lambda (name args)
(and use-package-always-demand
(not (plist-member args :defer))
(not (plist-member args :demand)))))
(:ensure (list use-package-always-ensure)
(lambda (name args)
(and use-package-always-ensure
(not (plist-member args :load-path)))))
(:pin use-package-always-pin use-package-always-pin))
Documentation
Default values for specified use-package keywords.
Each entry in the alist is a list of three elements:
The first element is the use-package keyword.
The second is a form that can be evaluated to get the default
value. It can also be a function that will receive the name of
the use-package declaration and the keyword plist given to
use-package, in normalized form. The value it returns should
also be in normalized form (which is sometimes *not* what one
would normally write in a use-package declaration, so use
caution).
The third element is a form that can be evaluated to determine
whether or not to assign a default value; if it evaluates to nil,
then the default value is not assigned even if the keyword is not
present in the use-package form. This third element may also be
a function, in which case it receives the name of the package (as
a symbol) and a list of keywords (in normalized form). It should
return nil or non-nil depending on whether defaulting should be
attempted.
This variable was added, or its default value changed, in Emacs 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
(defcustom use-package-defaults
'(;; this '(t) has special meaning; see `use-package-handler/:config'
(:config '(t) t)
(:init nil t)
(:catch t (lambda (name args)
(not use-package-expand-minimally)))
(:defer use-package-always-defer
(lambda (name args)
(and use-package-always-defer
(not (plist-member args :defer))
(not (plist-member args :demand)))))
(:demand use-package-always-demand
(lambda (name args)
(and use-package-always-demand
(not (plist-member args :defer))
(not (plist-member args :demand)))))
(:ensure (list use-package-always-ensure)
(lambda (name args)
(and use-package-always-ensure
(not (plist-member args :load-path)))))
(:pin use-package-always-pin use-package-always-pin))
"Default values for specified `use-package' keywords.
Each entry in the alist is a list of three elements:
The first element is the `use-package' keyword.
The second is a form that can be evaluated to get the default
value. It can also be a function that will receive the name of
the `use-package' declaration and the keyword plist given to
`use-package', in normalized form. The value it returns should
also be in normalized form (which is sometimes *not* what one
would normally write in a `use-package' declaration, so use
caution).
The third element is a form that can be evaluated to determine
whether or not to assign a default value; if it evaluates to nil,
then the default value is not assigned even if the keyword is not
present in the `use-package' form. This third element may also be
a function, in which case it receives the name of the package (as
a symbol) and a list of keywords (in normalized form). It should
return nil or non-nil depending on whether defaulting should be
attempted."
:type `(repeat
(list (symbol :tag "Keyword")
(choice :tag "Default value" sexp function)
(choice :tag "Enable if non-nil" sexp function)))
:group 'use-package
:version "31.1")