Variable: use-package-inject-hooks
use-package-inject-hooks is a customizable variable defined in
use-package-core.el.gz.
Value
nil
Documentation
If non-nil, add hooks to the :init and :config sections.
In particular, for a given package foo, the following hooks
become available:
use-package--foo--pre-init-hook
use-package--foo--post-init-hook
use-package--foo--pre-config-hook
use-package--foo--post-config-hook
This way, you can add to these hooks before evaluation of a
`use-package` declaration, and exercise some control over what
happens.
NOTE: These hooks are run even if the user does not specify an
:init or :config block, and they will happen at the regular
time when initialization and configuration would have been
performed.
NOTE: If the pre-init hook return a nil value, that block's
user-supplied configuration is not evaluated, so be certain to
return t if you only wish to add behavior to what the user had
specified.
This variable was added, or its default value changed, in Emacs 29.1.
Source Code
;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
(defcustom use-package-inject-hooks nil
"If non-nil, add hooks to the `:init' and `:config' sections.
In particular, for a given package `foo', the following hooks
become available:
`use-package--foo--pre-init-hook'
`use-package--foo--post-init-hook'
`use-package--foo--pre-config-hook'
`use-package--foo--post-config-hook'
This way, you can add to these hooks before evaluation of a
`use-package` declaration, and exercise some control over what
happens.
NOTE: These hooks are run even if the user does not specify an
`:init' or `:config' block, and they will happen at the regular
time when initialization and configuration would have been
performed.
NOTE: If the `pre-init' hook return a nil value, that block's
user-supplied configuration is not evaluated, so be certain to
return t if you only wish to add behavior to what the user had
specified."
:type 'boolean
:group 'use-package
:version "29.1")