From c29b31c258e2e5c01aed83a60e74f1614b468b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Kryger?= Date: Thu, 12 Dec 2024 09:35:55 +0000 Subject: [PATCH] Use aliases for :exordium-force-elpa use-package extension Seems like a shared practice, at least straight.el and Elpaca are using this technique. --- modules/init-force-elpa.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/init-force-elpa.el b/modules/init-force-elpa.el index d5a3d5aa..aa4ae81a 100644 --- a/modules/init-force-elpa.el +++ b/modules/init-force-elpa.el @@ -28,7 +28,7 @@ :autoload (use-package-only-one use-package-process-keywords))) -(defun use-package-normalize/:exordium-force-elpa (_name keyword args) +(defun exordium--use-package-force-elpa-normalize (_name keyword args) ; checkdoc-params: (keyword args) "Allow either a single string or a single symbol." (use-package-only-one (symbol-name keyword) args @@ -116,7 +116,7 @@ name (error-message-string err)) :error)))))) -(defun use-package-handler/:exordium-force-elpa (name _keyword archive-name rest state) +(defun exordium--use-package-handler-force-elpa (name _keyword archive-name rest state) ; checkdoc-params: (rest state) "Pin package NAME to ELPA archive ARCHIVE-NAME and install it from there. Installation and pinning only hapens when the package is a @@ -138,6 +138,12 @@ see Info node `(emacs) Package Installation'." (push force-elpa-form body)) ; or else wait until runtime. body)) +(defalias 'use-package-normalize/:exordium-force-elpa + #'exordium--use-package-force-elpa-normalize) + +(defalias 'use-package-handler/:exordium-force-elpa + #'exordium--use-package-handler-force-elpa) + (eval-after-load 'use-package-core '(add-to-list 'use-package-keywords :exordium-force-elpa))