summaryrefslogtreecommitdiff
path: root/lisp/use-package/use-package-core.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2022-08-07 08:57:58 -0700
committerGitHub <noreply@github.com>2022-08-07 08:57:58 -0700
commit28e7b96fcf092e3541d39a57c99d975f7b02d529 (patch)
tree68e2a1f4207bac7ac4187bc09504b5f20b11b4e2 /lisp/use-package/use-package-core.el
parentb1fbfe66eb9bd570d74c3984d5ae0460649b1f23 (diff)
parent8f1a345b5bfd6bcf057ff558b2cffa3b047ad0fd (diff)
downloademacs-28e7b96fcf092e3541d39a57c99d975f7b02d529.tar.gz
emacs-28e7b96fcf092e3541d39a57c99d975f7b02d529.tar.bz2
emacs-28e7b96fcf092e3541d39a57c99d975f7b02d529.zip
Merge pull request from waymondo/use-package-hook-handler-flatten-mode-symbols
GitHub-reference: https://github.com/jwiegley/use-package/issues/775
Diffstat (limited to 'lisp/use-package/use-package-core.el')
-rw-r--r--lisp/use-package/use-package-core.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el
index 3cbcd69ffff..36d5ccb977b 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -1315,9 +1315,13 @@ meaning:
(concat (symbol-name sym)
use-package-hook-name-suffix)))
(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))))
+(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
(defalias 'use-package-normalize/:commands 'use-package-normalize-symlist)