Add fpkg/require function

This commit is contained in:
Sameer Rahmani 2023-06-11 20:46:29 +01:00
parent 08e52fb49d
commit d6f6d931f5
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
;;; Cube --- Cube library of FG42 -*- lexical-binding: t; -*-
;;
;; Copyright (c) 2010-2022 Sameer Rahmani & Contributors
;; Copyright (c) 2010-2023 Sameer Rahmani & Contributors
;;
;; Author: Sameer Rahmani <lxsameer@gnu.org>
;; URL: https://devheroes.codes/FG42/FG42

View File

@ -52,5 +52,11 @@
`(use-package ,pkg :straight t :defer t)))
(defun fpkg/require (pkg)
"Work like require but make sure that PKG is installed first."
(fpkg/use pkg
:init
(require pkg)))
(provide 'fpkg)
;;; fpkg.el ends here