* lisp/use-package/use-package-core.el
(use-package-handler/:hook): Append "-hook" to the symbol's name
only if the named hook variable has no 'symbol-value'.
(Bug#72818)
(when fun
(mapcar
#'(lambda (sym)
- `(add-hook
- (quote ,(intern
- (concat (symbol-name sym)
- use-package-hook-name-suffix)))
- (function ,fun)))
+ (if (boundp sym)
+ `(add-hook (quote ,sym) (function ,fun))
+ `(add-hook
+ (quote ,(intern
+ (concat (symbol-name sym)
+ use-package-hook-name-suffix)))
+ (function ,fun))))
(use-package-hook-handler-normalize-mode-symbols syms)))))
(use-package-normalize-commands args))))