summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Talbott <justin@waymondo.com>2019-06-14 19:48:25 -0400
committerJustin Talbott <justin@waymondo.com>2019-06-14 19:48:25 -0400
commit8ec41be4180ffba60d59bfe181e65df78d9e81f8 (patch)
tree0b5cd8312c70c3962a9b6144eff537f2b38690c3
parent97f0287e1968d3ccd802fe52a4dbca707babd7fa (diff)
downloademacs-8ec41be418.tar.gz
extract use-package-hook-handler-flatten-mode-symbols function
-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 7b4d26ba2a3..543cb80d186 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -1266,9 +1266,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-flatten-mode-symbols syms)))))
(use-package-normalize-commands args))))
+(defun use-package-hook-handler-flatten-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)