]> git.eshelyaron.com Git - emacs.git/commitdiff
use `use-package-as-one` for normalizing `:ensure-system-package`
authorJustin Talbott <justin@waymondo.com>
Sun, 10 Feb 2019 01:52:50 +0000 (20:52 -0500)
committerJustin Talbott <justin@waymondo.com>
Fri, 14 Jun 2019 22:50:38 +0000 (18:50 -0400)
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"))
```

lisp/use-package/use-package-ensure-system-package.el

index 87abf407020f481efb7e9ef62a20e42a8cd63ae9..948d69df4badacc44e86d4578f511b3a4d84d44c 100644 (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)))