From 1343783532e7e9f242818b5b8851069a7ca3faf9 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sat, 17 Apr 2021 17:08:35 -0400 Subject: [PATCH] feat: add update custom packages command Copyright-paperwork-exempt: yes --- lisp/use-package/use-package-ensure-system-package.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/use-package/use-package-ensure-system-package.el b/lisp/use-package/use-package-ensure-system-package.el index 87abf407020..9899968877b 100644 --- a/lisp/use-package/use-package-ensure-system-package.el +++ b/lisp/use-package/use-package-ensure-system-package.el @@ -25,6 +25,8 @@ (eval-when-compile (declare-function system-packages-get-command "system-packages")) +(defvar use-package-ensure-system-package--custom-packages '() + "List of custom packages installed.") (defun use-package-ensure-system-package-consify (arg) "Turn `arg' into a cons of (`package-name' . `install-command')." @@ -38,11 +40,18 @@ ((not (cdr arg)) (use-package-ensure-system-package-consify (car arg))) ((stringp (cdr arg)) - (cons (car arg) `(async-shell-command ,(cdr arg)))) + (progn + (push (cdr arg) use-package-ensure-system-package--custom-packages) + (cons (car arg) `(async-shell-command ,(cdr arg))))) (t (cons (car arg) `(system-packages-install ,(symbol-name (cdr arg))))))))) +(defun use-package-ensure-system-package-update-custom-packages () + (interactive) + (dolist (cmd use-package-ensure-system-package--custom-packages) + (async-shell-command cmd))) + ;;;###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')." -- 2.39.2