use use-package-as-one for normalizing :ensure-system-package

This makes the preferred syntax consistent with other `use-package`
keywords. All of these are now valid:

```
(use-package format-all
  :ensure-system-package
  (prettier . "npm i -g prettier")
  (rufo . "gem install rufo"))

(use-package format-all
  :ensure-system-package
  ((prettier . "npm i -g prettier")
   (rufo . "gem install rufo")))

(use-package format-all
  :ensure-system-package
  (prettier . "npm i -g prettier"))
```
This commit is contained in:
Justin Talbott 2019-02-09 20:52:50 -05:00
parent 97f0287e19
commit 4149ec6cfa

View file

@ -46,7 +46,7 @@
;;;###autoload
(defun use-package-normalize/:ensure-system-package (_name-symbol keyword args)
"Turn `arg' into a list of cons-es of (`package-name' . `install-command')."
(use-package-only-one (symbol-name keyword) args
(use-package-as-one (symbol-name keyword) args
(lambda (_label arg)
(cond
((and (listp arg) (listp (cdr arg)))