diff options
| author | Justin Talbott | 2019-06-14 19:48:25 -0400 |
|---|---|---|
| committer | Justin Talbott | 2019-06-14 19:48:25 -0400 |
| commit | 8ec41be4180ffba60d59bfe181e65df78d9e81f8 (patch) | |
| tree | 0b5cd8312c70c3962a9b6144eff537f2b38690c3 | |
| parent | 97f0287e1968d3ccd802fe52a4dbca707babd7fa (diff) | |
| download | emacs-8ec41be4180ffba60d59bfe181e65df78d9e81f8.tar.gz emacs-8ec41be4180ffba60d59bfe181e65df78d9e81f8.zip | |
extract use-package-hook-handler-flatten-mode-symbols function
| -rw-r--r-- | lisp/use-package/use-package-core.el | 6 |
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: | |||
| 1266 | (concat (symbol-name sym) | 1266 | (concat (symbol-name sym) |
| 1267 | use-package-hook-name-suffix))) | 1267 | use-package-hook-name-suffix))) |
| 1268 | (function ,fun))) | 1268 | (function ,fun))) |
| 1269 | (if (use-package-non-nil-symbolp syms) (list syms) syms))))) | 1269 | (use-package-hook-handler-flatten-mode-symbols syms))))) |
| 1270 | (use-package-normalize-commands args)))) | 1270 | (use-package-normalize-commands args)))) |
| 1271 | 1271 | ||
| 1272 | (defun use-package-hook-handler-flatten-mode-symbols (syms) | ||
| 1273 | "Ensure that `SYMS' turns into a list of modes." | ||
| 1274 | (if (use-package-non-nil-symbolp syms) (list syms) syms)) | ||
| 1275 | |||
| 1272 | ;;;; :commands | 1276 | ;;;; :commands |
| 1273 | 1277 | ||
| 1274 | (defalias 'use-package-normalize/:commands 'use-package-normalize-symlist) | 1278 | (defalias 'use-package-normalize/:commands 'use-package-normalize-symlist) |