Fix handling of hook variables in 'use-package'
* 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)
This commit is contained in:
parent
bb5576fc90
commit
4f521fa14c
1 changed files with 7 additions and 5 deletions
|
@ -1376,11 +1376,13 @@ enable gathering statistics."
|
||||||
(when fun
|
(when fun
|
||||||
(mapcar
|
(mapcar
|
||||||
#'(lambda (sym)
|
#'(lambda (sym)
|
||||||
`(add-hook
|
(if (boundp sym)
|
||||||
(quote ,(intern
|
`(add-hook (quote ,sym) (function ,fun))
|
||||||
(concat (symbol-name sym)
|
`(add-hook
|
||||||
use-package-hook-name-suffix)))
|
(quote ,(intern
|
||||||
(function ,fun)))
|
(concat (symbol-name sym)
|
||||||
|
use-package-hook-name-suffix)))
|
||||||
|
(function ,fun))))
|
||||||
(use-package-hook-handler-normalize-mode-symbols syms)))))
|
(use-package-hook-handler-normalize-mode-symbols syms)))))
|
||||||
(use-package-normalize-commands args))))
|
(use-package-normalize-commands args))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue