Merge pull request from waymondo/use-package-hook-handler-flatten-mode-symbols

GitHub-reference: https://github.com/jwiegley/use-package/issues/775
This commit is contained in:
John Wiegley 2022-08-07 08:57:58 -07:00 committed by GitHub
commit 28e7b96fcf

View file

@ -1315,9 +1315,13 @@ meaning:
(concat (symbol-name sym) (concat (symbol-name sym)
use-package-hook-name-suffix))) use-package-hook-name-suffix)))
(function ,fun))) (function ,fun)))
(if (use-package-non-nil-symbolp syms) (list syms) syms))))) (use-package-hook-handler-normalize-mode-symbols syms)))))
(use-package-normalize-commands args)))) (use-package-normalize-commands args))))
(defun use-package-hook-handler-normalize-mode-symbols (syms)
"Ensure that `SYMS' turns into a list of modes."
(if (use-package-non-nil-symbolp syms) (list syms) syms))
;;;; :commands ;;;; :commands
(defalias 'use-package-normalize/:commands 'use-package-normalize-symlist) (defalias 'use-package-normalize/:commands 'use-package-normalize-symlist)